1 | {"version":3,"file":"angular-fire-auth.js","sources":["../../../src/auth/auth.ts","../../../src/auth/auth.module.ts","../../../src/auth/rxfire.ts","../../../src/auth/firebase.ts","../../../src/auth/angular-fire-auth.ts"],"sourcesContent":["import { Auth as FirebaseAuth } from 'firebase/auth';\nimport { ɵgetAllInstancesOf } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\nexport const AUTH_PROVIDER_NAME = 'auth';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// tslint:disable-next-line:no-empty-interface\nexport interface Auth extends FirebaseAuth {}\n\nexport class Auth {\n constructor(auth: FirebaseAuth) {\n return auth;\n }\n}\n\n// tslint:disable-next-line:no-empty-interface\nexport interface AuthInstances extends Array<FirebaseAuth> {}\n\nexport class AuthInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseAuth>(AUTH_PROVIDER_NAME);\n }\n}\n\nexport const authInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseAuth>(AUTH_PROVIDER_NAME))),\n distinct(),\n);\n","import { NgModule, Optional, NgZone, InjectionToken, ModuleWithProviders, Injector } from '@angular/core';\nimport { Auth as FirebaseAuth } from 'firebase/auth';\nimport { ɵgetDefaultInstanceOf, ɵAngularFireSchedulers, VERSION } from '@angular/fire';\nimport { Auth, AuthInstances, AUTH_PROVIDER_NAME } from './auth';\nimport { FirebaseApps, FirebaseApp } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\n\nexport const PROVIDED_AUTH_INSTANCES = new InjectionToken<Auth[]>('angularfire2.auth-instances');\n\nexport function defaultAuthInstanceFactory(provided: FirebaseAuth[]|undefined, defaultApp: FirebaseApp) {\n const defaultAuth = ɵgetDefaultInstanceOf<FirebaseAuth>(AUTH_PROVIDER_NAME, provided, defaultApp);\n return defaultAuth && new Auth(defaultAuth);\n}\n\nexport function authInstanceFactory(fn: (injector: Injector) => FirebaseAuth) {\n return (zone: NgZone, injector: Injector) => {\n const auth = zone.runOutsideAngular(() => fn(injector));\n return new Auth(auth);\n };\n}\n\nconst AUTH_INSTANCES_PROVIDER = {\n provide: AuthInstances,\n deps: [\n [new Optional(), PROVIDED_AUTH_INSTANCES ],\n ]\n};\n\nconst DEFAULT_AUTH_INSTANCE_PROVIDER = {\n provide: Auth,\n useFactory: defaultAuthInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_AUTH_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_AUTH_INSTANCE_PROVIDER,\n AUTH_INSTANCES_PROVIDER,\n ]\n})\nexport class AuthModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth');\n }\n}\n\nexport function provideAuth(fn: () => FirebaseAuth, ...deps: any[]): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [{\n provide: PROVIDED_AUTH_INSTANCES,\n useFactory: authInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n [new Optional(), AppCheckInstances ],\n ...deps,\n ]\n }]\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n authState as _authState,\n user as _user,\n idToken as _idToken\n} from 'rxfire/auth';\n\nexport const authState = ɵzoneWrap(_authState, true);\nexport const user = ɵzoneWrap(_user, true);\nexport const idToken = ɵzoneWrap(_idToken, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/auth';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n applyActionCode as _applyActionCode,\n checkActionCode as _checkActionCode,\n confirmPasswordReset as _confirmPasswordReset,\n connectAuthEmulator as _connectAuthEmulator,\n createUserWithEmailAndPassword as _createUserWithEmailAndPassword,\n deleteUser as _deleteUser,\n fetchSignInMethodsForEmail as _fetchSignInMethodsForEmail,\n getAdditionalUserInfo as _getAdditionalUserInfo,\n getAuth as _getAuth,\n getIdToken as _getIdToken,\n getIdTokenResult as _getIdTokenResult,\n getMultiFactorResolver as _getMultiFactorResolver,\n getRedirectResult as _getRedirectResult,\n initializeAuth as _initializeAuth,\n isSignInWithEmailLink as _isSignInWithEmailLink,\n linkWithCredential as _linkWithCredential,\n linkWithPhoneNumber as _linkWithPhoneNumber,\n linkWithPopup as _linkWithPopup,\n linkWithRedirect as _linkWithRedirect,\n multiFactor as _multiFactor,\n onAuthStateChanged as _onAuthStateChanged,\n onIdTokenChanged as _onIdTokenChanged,\n parseActionCodeURL as _parseActionCodeURL,\n reauthenticateWithCredential as _reauthenticateWithCredential,\n reauthenticateWithPhoneNumber as _reauthenticateWithPhoneNumber,\n reauthenticateWithPopup as _reauthenticateWithPopup,\n reauthenticateWithRedirect as _reauthenticateWithRedirect,\n reload as _reload,\n sendEmailVerification as _sendEmailVerification,\n sendPasswordResetEmail as _sendPasswordResetEmail,\n sendSignInLinkToEmail as _sendSignInLinkToEmail,\n setPersistence as _setPersistence,\n signInAnonymously as _signInAnonymously,\n signInWithCredential as _signInWithCredential,\n signInWithCustomToken as _signInWithCustomToken,\n signInWithEmailAndPassword as _signInWithEmailAndPassword,\n signInWithEmailLink as _signInWithEmailLink,\n signInWithPhoneNumber as _signInWithPhoneNumber,\n signInWithPopup as _signInWithPopup,\n signInWithRedirect as _signInWithRedirect,\n signOut as _signOut,\n unlink as _unlink,\n updateCurrentUser as _updateCurrentUser,\n updateEmail as _updateEmail,\n updatePassword as _updatePassword,\n updatePhoneNumber as _updatePhoneNumber,\n updateProfile as _updateProfile,\n useDeviceLanguage as _useDeviceLanguage,\n verifyBeforeUpdateEmail as _verifyBeforeUpdateEmail,\n verifyPasswordResetCode as _verifyPasswordResetCode\n} from 'firebase/auth';\n\nexport const applyActionCode = ɵzoneWrap(_applyActionCode, true);\nexport const checkActionCode = ɵzoneWrap(_checkActionCode, true);\nexport const confirmPasswordReset = ɵzoneWrap(_confirmPasswordReset, true);\nexport const connectAuthEmulator = ɵzoneWrap(_connectAuthEmulator, true);\nexport const createUserWithEmailAndPassword = ɵzoneWrap(_createUserWithEmailAndPassword, true);\nexport const deleteUser = ɵzoneWrap(_deleteUser, true);\nexport const fetchSignInMethodsForEmail = ɵzoneWrap(_fetchSignInMethodsForEmail, true);\nexport const getAdditionalUserInfo = ɵzoneWrap(_getAdditionalUserInfo, true);\nexport const getAuth = ɵzoneWrap(_getAuth, true);\nexport const getIdToken = ɵzoneWrap(_getIdToken, true);\nexport const getIdTokenResult = ɵzoneWrap(_getIdTokenResult, true);\nexport const getMultiFactorResolver = ɵzoneWrap(_getMultiFactorResolver, true);\nexport const getRedirectResult = ɵzoneWrap(_getRedirectResult, true);\nexport const initializeAuth = ɵzoneWrap(_initializeAuth, true);\nexport const isSignInWithEmailLink = ɵzoneWrap(_isSignInWithEmailLink, true);\nexport const linkWithCredential = ɵzoneWrap(_linkWithCredential, true);\nexport const linkWithPhoneNumber = ɵzoneWrap(_linkWithPhoneNumber, true);\nexport const linkWithPopup = ɵzoneWrap(_linkWithPopup, true);\nexport const linkWithRedirect = ɵzoneWrap(_linkWithRedirect, true);\nexport const multiFactor = ɵzoneWrap(_multiFactor, true);\nexport const onAuthStateChanged = ɵzoneWrap(_onAuthStateChanged, true);\nexport const onIdTokenChanged = ɵzoneWrap(_onIdTokenChanged, true);\nexport const parseActionCodeURL = ɵzoneWrap(_parseActionCodeURL, true);\nexport const reauthenticateWithCredential = ɵzoneWrap(_reauthenticateWithCredential, true);\nexport const reauthenticateWithPhoneNumber = ɵzoneWrap(_reauthenticateWithPhoneNumber, true);\nexport const reauthenticateWithPopup = ɵzoneWrap(_reauthenticateWithPopup, true);\nexport const reauthenticateWithRedirect = ɵzoneWrap(_reauthenticateWithRedirect, true);\nexport const reload = ɵzoneWrap(_reload, true);\nexport const sendEmailVerification = ɵzoneWrap(_sendEmailVerification, true);\nexport const sendPasswordResetEmail = ɵzoneWrap(_sendPasswordResetEmail, true);\nexport const sendSignInLinkToEmail = ɵzoneWrap(_sendSignInLinkToEmail, true);\nexport const setPersistence = ɵzoneWrap(_setPersistence, true);\nexport const signInAnonymously = ɵzoneWrap(_signInAnonymously, true);\nexport const signInWithCredential = ɵzoneWrap(_signInWithCredential, true);\nexport const signInWithCustomToken = ɵzoneWrap(_signInWithCustomToken, true);\nexport const signInWithEmailAndPassword = ɵzoneWrap(_signInWithEmailAndPassword, true);\nexport const signInWithEmailLink = ɵzoneWrap(_signInWithEmailLink, true);\nexport const signInWithPhoneNumber = ɵzoneWrap(_signInWithPhoneNumber, true);\nexport const signInWithPopup = ɵzoneWrap(_signInWithPopup, true);\nexport const signInWithRedirect = ɵzoneWrap(_signInWithRedirect, true);\nexport const signOut = ɵzoneWrap(_signOut, true);\nexport const unlink = ɵzoneWrap(_unlink, true);\nexport const updateCurrentUser = ɵzoneWrap(_updateCurrentUser, true);\nexport const updateEmail = ɵzoneWrap(_updateEmail, true);\nexport const updatePassword = ɵzoneWrap(_updatePassword, true);\nexport const updatePhoneNumber = ɵzoneWrap(_updatePhoneNumber, true);\nexport const updateProfile = ɵzoneWrap(_updateProfile, true);\nexport const useDeviceLanguage = ɵzoneWrap(_useDeviceLanguage, true);\nexport const verifyBeforeUpdateEmail = ɵzoneWrap(_verifyBeforeUpdateEmail, true);\nexport const verifyPasswordResetCode = ɵzoneWrap(_verifyPasswordResetCode, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["_authState","_user","_idToken","_applyActionCode","_checkActionCode","_confirmPasswordReset","_connectAuthEmulator","_createUserWithEmailAndPassword","_deleteUser","_fetchSignInMethodsForEmail","_getAdditionalUserInfo","_getAuth","_getIdToken","_getIdTokenResult","_getMultiFactorResolver","_getRedirectResult","_initializeAuth","_isSignInWithEmailLink","_linkWithCredential","_linkWithPhoneNumber","_linkWithPopup","_linkWithRedirect","_multiFactor","_onAuthStateChanged","_onIdTokenChanged","_parseActionCodeURL","_reauthenticateWithCredential","_reauthenticateWithPhoneNumber","_reauthenticateWithPopup","_reauthenticateWithRedirect","_reload","_sendEmailVerification","_sendPasswordResetEmail","_sendSignInLinkToEmail","_setPersistence","_signInAnonymously","_signInWithCredential","_signInWithCustomToken","_signInWithEmailAndPassword","_signInWithEmailLink","_signInWithPhoneNumber","_signInWithPopup","_signInWithRedirect","_signOut","_unlink","_updateCurrentUser","_updateEmail","_updatePassword","_updatePhoneNumber","_updateProfile","_useDeviceLanguage","_verifyBeforeUpdateEmail","_verifyPasswordResetCode"],"mappings":";;;;;;;;;;;;AAKO,MAAM,kBAAkB,GAAG,MAAM,CAAC;MAM5B,IAAI;IACf,YAAY,IAAkB;QAC5B,OAAO,IAAI,CAAC;KACb;CACF;MAKY,aAAa;IACxB;QACE,OAAO,kBAAkB,CAAe,kBAAkB,CAAC,CAAC;KAC7D;CACF;MAEY,aAAa,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAC7C,SAAS,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAe,kBAAkB,CAAC,CAAC,CAAC,EAC3E,QAAQ,EAAE;;ACpBL,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAS,6BAA6B,CAAC,CAAC;SAEjF,0BAA0B,CAAC,QAAkC,EAAE,UAAuB;IACpG,MAAM,WAAW,GAAG,qBAAqB,CAAe,kBAAkB,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAClG,OAAO,WAAW,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC;SAEe,mBAAmB,CAAC,EAAwC;IAC1E,OAAO,CAAC,IAAY,EAAE,QAAkB;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,uBAAuB,GAAG;IAC9B,OAAO,E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