Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase and the Google OAuth consent screen

I have a web app developed using Firebase. It is hosted by Firebase and my domain is connected to it. It uses Google as an identity provider for authentication. However, when signing-in via a popup, the Google 'OAuth consent screen' provides a link direct to the Firebase project.

Is there a way to make the link point to the associated web site?

like image 333
acuth Avatar asked Dec 31 '25 18:12

acuth


1 Answers

Turns out there is an easy solution for my scenario. Just needed to set the authDomain parameter of config passed to the firebase.initializeApp() method to my domain (rather than the default <project-name>.firebaseapp.com value). Initially this will cause the OAuth screen to throw an error but it includes a link to a configuration page where I needed to add /_auth/handler" rel="nofollow noreferrer">https://<my-domain>/_auth/handler to the list of authorization handlers.

like image 123
acuth Avatar answered Jan 03 '26 13:01

acuth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!