-
Notifications
You must be signed in to change notification settings - Fork 898
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
Getting FirebaseError (auth/argument-error) if authDomain URL specifies port number #7233
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Seems to be from an |
Why is People may ask "Why do you even need So.. my preferred option here would be to find a way to provide a |
@prameshj in #7037 you recommended to follow https://firebase.google.com/docs/auth/web/redirect-best-practices. However, if I do that then it's rather difficult to test authentication on a local machine if Firebase Auth does not accept an Is there a chance that this will be fixed anytime soon or am I missing something here? |
@falk-stefan This is a valid usecase. We will work on supporting port numbers in the authDomain. Also this check existed even before #7191, it was just refactored in that PR. |
cc @bhparijat |
The Setup
I have an Angular application which is hosted by a Spring Boot application. This application is deployed with Cloud Run on GCP which means the domain is not running under
project-name.firebase.com
, but instead undersomething.run.app
Since the web-app is mobile-focused, I am required to handle sign-ins via redirect. Hence, I am following redirect best practices from the documentation.
There, option 3 suggests to proxy any
/__/auth
requests, which is what I am doing by configuring my Spring Boot server as a proxy for any requsts on said paths:Since I don't know how to validate Firebase Authenticator Emulator JWTs, I am using a (live) development project, an actual Firebase Project, during local development.
For local development and testing, I am eventually required to set the
authDomain
tolocalhost:8008
, the address of the local Spring Boot application.The Problem
However, the application crashes right on startup with the following error:
This error only occurs if I am specifying the port number on the URL. Setting
authDomain
to justlocalhost
or0.0.0.0
, won't crash the app. However, in this case I am not able to sign-in as the server requires port 8080.I have tried to prepare a StackBlitz example, but for some reason I am unable to import
browserPopupRedirectResolver
,browserSessionPersistence
andindexedDBLocalPersistence
because why not?! which means I am unable to provide a reproducable example at this point.The Question
How can I fix this issue and make it work?
The text was updated successfully, but these errors were encountered: