Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication lost on reload page when using emulators #2736

Closed
carminemilieni opened this issue Jan 14, 2021 · 3 comments
Closed

Authentication lost on reload page when using emulators #2736

carminemilieni opened this issue Jan 14, 2021 · 3 comments

Comments

@carminemilieni
Copy link

Version info

Angular: 10.0.7

Firebase: 8.2.2

AngularFire: 6.1.4

How to reproduce these conditions

Steps to set up and reproduce

Enable emulators
{provide: USE_AUTH_EMULATOR, useValue: environment.useEmulators ? ['localhost', 9099] : undefined}, {provide: USE_DATABASE_EMULATOR, useValue: environment.useEmulators ? ['localhost', 9500] : undefined}, {provide: USE_FIRESTORE_EMULATOR, useValue: environment.useEmulators ? ['localhost', 8080] : undefined}, {provide: USE_FUNCTIONS_EMULATOR, useValue: environment.useEmulators ? ['localhost', 5001] : undefined}, { provide: NEW_ORIGIN_BEHAVIOR, useValue: true }, { provide: FUNCTIONS_ORIGIN, useFactory: () => isDevMode() ? undefined : location.origin }
Reload page "Command+R" after logged in

Debug output

Errors in the JavaScript console
After reload page, on chrome debug console displayed this error message
zone-evergreen.js:2845 POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/getAccountInfo?key=XXXXX

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@markgoho
Copy link
Contributor

@carminemilieni more info on this bug can be found here:

This is a known bug with the SDK. A temporary workaround is provided by @jamesdaniels in the SDK Issue thread

@jamesdaniels
Copy link
Member

Going to close as there's nothing AngularFire can do for now. I'd have to push a major change to make AngularFireAuth (which is lazy) resolve optionally before AngularFireStore, etc. (which aren't lazy right now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants