Firebase custom hosting OAuth not working

510 views
Skip to first unread message

William Gilpin

unread,
Apr 28, 2017, 10:07:58 AM4/28/17
to Firebase Google Group
My firebase app works on the autogenerated url ([APP].firebaseapp.com) - I can login with Google OAuth or email/pwd as I have configured

I have connected a custom domain as follows:
 - domain is of the form appname.uk, note it's not a subdomain like www.
 - under Hosting it is set as a custom domain, and the console shows it as "connected"
 - under Authentication it set as an OAuth Redirect Domain, type Custom

It's a web app, using signInWithRedirect 

If I connect via the auto-generated (*.firebaseapp.com) URL I can sign in with Google or with Email/pwd.

If I connect via the custom domain I can sign in by Email / pwd, but if I try to sign in by Google I get the google account selection page, then return to the app, but onAuthStateChanged is not triggered and the user is not logged in.

Is there a step I have missed to enable Google OAuth with a custom domain?

Bassam

unread,
May 3, 2017, 1:39:02 AM5/3/17
to Firebase Google Group
Hey William,
If you are using your own custom domain hosted by Firebase, change the authDomain
from:
to:

Make sure you whitelist that new domain in Firebase console and in your Google OAuth client.

Bassam
Reply all
Reply to author
Forward
0 new messages