Search code examples
firebasegoogle-cloud-platformoauth-2.0firebase-hosting

Unable to add Authorized redirect URI for OAuth 2.0 client


I'm setting up an OAuth client for a Firebase application on Firebase Hosting, and I'm trying to add an authorized redirect URI to the "Web client (auto created by Google Service)" here:

https://console.cloud.google.com/apis/credentials/oauthclient

I'd like to add https://my-project.web.app/serviceworker/redirect but the update operation silently fails - loader just keeps spinning - and reports the following in the console:

Uncaught Proxy {Symbol(Symbol.toStringTag): "ErrorResponse"}

and

Uncaught Error: Ch

I'd rather not post the specific domain here, but the strange thing is, I've been able to add it in another project, as a test, and I've also been able to add the https://www.my-project.firebaseapp.com/serviceworker/redirect address with no issues. And for what it's worth, the subdomain https://www.my-project.web.app/serviceworker/redirect was also fine. (Although it doesn't actually fix my issue)

So it seems to be a specific issue with this particular domain and in this particular project.

Posting here in the hopes that someone on Google's side has any more ideas, as I'm at a loss. Thanks in advance.


Solution

  • I have no idea why this would make a difference for this specific domain, but the issue resolved itself once I went through the "OAuth consent screen" setup. So if you encounter this issue, I'd make sure everything's set up there first.