Skip to content

Commit e97bcac

Browse files
authored
Merge branch 'master' into ng12
2 parents d1b0b09 + 984803d commit e97bcac

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/auth/auth.spec.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import firebase from 'firebase/app';
22
import { Observable, Subject } from 'rxjs';
33
import { TestBed } from '@angular/core/testing';
44
import { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp } from '@angular/fire';
5-
import { AngularFireAuth, AngularFireAuthModule } from '@angular/fire/auth';
5+
import { AngularFireAuth, AngularFireAuthModule, SETTINGS } from '@angular/fire/auth';
66
import { COMMON_CONFIG } from '../test-config';
77
import 'firebase/auth';
88
import { rando } from '../firestore/utils.spec';
@@ -22,6 +22,9 @@ describe('AngularFireAuth', () => {
2222
imports: [
2323
AngularFireModule.initializeApp(COMMON_CONFIG, rando()),
2424
AngularFireAuthModule
25+
],
26+
providers: [
27+
{ provide: SETTINGS, useValue: { appVerificationDisabledForTesting: true } }
2528
]
2629
});
2730

@@ -72,6 +75,11 @@ describe('AngularFireAuth', () => {
7275
expect(afAuth.app).toBeDefined();
7376
});
7477

78+
it('should have disabled app verification for testing', async () => {
79+
const app = await afAuth.app;
80+
expect(app.auth().settings.appVerificationDisabledForTesting).toBe(true);
81+
});
82+
7583
it('should emit auth updates through authState', (done: any) => {
7684
let count = 0;
7785

src/auth/auth.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ export class AngularFireAuth {
9999
auth.useDeviceLanguage();
100100
}
101101
if (settings) {
102-
auth.settings = settings;
102+
for (const [k, v] of Object.entries(settings)) {
103+
auth.settings[k] = v;
104+
}
103105
}
104106
if (persistence) {
105107
auth.setPersistence(persistence);

0 commit comments

Comments
 (0)