@@ -31,7 +31,13 @@ import {
31
31
import { Auth , ConfigInternal } from '../../model/auth' ;
32
32
import { PopupRedirectResolver } from '../../model/popup_redirect' ;
33
33
import { User } from '../../model/user' ;
34
- import { AuthErrorCode , AuthErrorMap , AuthErrorParams , ErrorMapRetriever , FALLBACK_AUTH_ERROR_FACTORY } from '../errors' ;
34
+ import {
35
+ AuthErrorCode ,
36
+ AuthErrorMap ,
37
+ AuthErrorParams ,
38
+ ErrorMapRetriever ,
39
+ FALLBACK_AUTH_ERROR_FACTORY
40
+ } from '../errors' ;
35
41
import { Persistence } from '../persistence' ;
36
42
import {
37
43
KeyName ,
@@ -69,7 +75,10 @@ export class AuthImpl implements Auth, _FirebaseService {
69
75
_deleted = false ;
70
76
_initializationPromise : Promise < void > | null = null ;
71
77
_popupRedirectResolver : PopupRedirectResolver | null = null ;
72
- _errorFactory : ErrorFactory < AuthErrorCode , AuthErrorParams > = FALLBACK_AUTH_ERROR_FACTORY ;
78
+ _errorFactory : ErrorFactory <
79
+ AuthErrorCode ,
80
+ AuthErrorParams
81
+ > = FALLBACK_AUTH_ERROR_FACTORY ;
73
82
readonly name : string ;
74
83
75
84
// Tracks the last notified UID for state change listeners to prevent
@@ -203,7 +212,11 @@ export class AuthImpl implements Auth, _FirebaseService {
203
212
useEmulator ( url : string ) : void {
204
213
_assert ( this . _canInitEmulator , this , AuthErrorCode . EMULATOR_CONFIG_FAILED ) ;
205
214
206
- _assert ( / ^ h t t p s ? : \/ \/ / . test ( url ) , this , AuthErrorCode . INVALID_EMULATOR_SCHEME ) ;
215
+ _assert (
216
+ / ^ h t t p s ? : \/ \/ / . test ( url ) ,
217
+ this ,
218
+ AuthErrorCode . INVALID_EMULATOR_SCHEME
219
+ ) ;
207
220
208
221
this . config . emulator = { url } ;
209
222
this . settings . appVerificationDisabledForTesting = true ;
@@ -220,7 +233,7 @@ export class AuthImpl implements Auth, _FirebaseService {
220
233
_assert (
221
234
! user || user . auth . name === this . name ,
222
235
this ,
223
- AuthErrorCode . ARGUMENT_ERROR ,
236
+ AuthErrorCode . ARGUMENT_ERROR
224
237
) ;
225
238
226
239
return this . _updateCurrentUser ( user && user . _clone ( ) ) ;
@@ -234,7 +247,7 @@ export class AuthImpl implements Auth, _FirebaseService {
234
247
_assert (
235
248
this . tenantId === user . tenantId ,
236
249
this ,
237
- AuthErrorCode . TENANT_ID_MISMATCH ,
250
+ AuthErrorCode . TENANT_ID_MISMATCH
238
251
) ;
239
252
}
240
253
return this . queue ( async ( ) => {
@@ -263,10 +276,11 @@ export class AuthImpl implements Auth, _FirebaseService {
263
276
}
264
277
265
278
_updateErrorMap ( errorMap : AuthErrorMap ) : void {
266
- this . _errorFactory = new ErrorFactory <
267
- AuthErrorCode ,
268
- AuthErrorParams
269
- > ( 'auth' , 'Firebase' , ( errorMap as ErrorMapRetriever ) ( ) ) ;
279
+ this . _errorFactory = new ErrorFactory < AuthErrorCode , AuthErrorParams > (
280
+ 'auth' ,
281
+ 'Firebase' ,
282
+ ( errorMap as ErrorMapRetriever ) ( )
283
+ ) ;
270
284
}
271
285
272
286
onAuthStateChanged (
0 commit comments