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

Error when entering localhost as address in providers #177

Open
Metsuryu opened this issue May 31, 2022 · 3 comments
Open

Error when entering localhost as address in providers #177

Metsuryu opened this issue May 31, 2022 · 3 comments

Comments

@Metsuryu
Copy link

Metsuryu commented May 31, 2022

When setting up the providers, the readme.md shows this:

providers: [ { provide: USE_AUTH_EMULATOR, useValue: !environment.production ? ['localhost', 9099] : undefined }, ],

But this gives an error:

ERROR FirebaseError: Firebase: Error (auth/invalid-emulator-scheme).

Because it checks for this assertion:

_assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* INVALID_EMULATOR_SCHEME */);

If instead of localhost I try to use http://127.0.0.1, it doesn't thorw the error anymore, but it doesn't work, showing "A network error has occurred"

and in console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1/identitytoolkit.googleapis.com/v1/accounts:createAuthUri?key=.... (Reason: CORS request did not succeed). Status code: (null).

@RaphaelJenni
Copy link
Owner

Hello @Metsuryu, sorry for the late response.

Is this still an issue?

@Metsuryu
Copy link
Author

Hi @RaphaelJenni, I stopped using the package, so I'm not sure, but probably.

@mbimbij
Copy link

mbimbij commented May 18, 2024

I am pulling my hair trying to get this thing to work, and i do encounter this issue:
image

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

No branches or pull requests

3 participants