Re: [Firebase] adding a custom OAuth redirect domain

2,172 views
Skip to first unread message

Jacob Wenger

unread,
May 31, 2016, 2:32:40 AM5/31/16
to fireba...@googlegroups.com
Hey Jeffrey,

What version of the Firebase SDK are you using? Also, are you using the console at https://console.firebase.google.com or at https://<databaseName>.firebasieo.com? If I had to guess, you are trying to use the Firebase 2.x.x SDK with a project created via the new Firebase console. That unfortunately will not work. The Firebase 2.x.x SDK only works for migrated projects. You'll need to use the Firebase 3.x.x SDK instead..

Jacob

On Sun, May 29, 2016 at 8:49 PM, Jeffrey Gordon <jgordon...@gmail.com> wrote:
I've got a project hosted on a custom domain. The menu has changed, but it appears that I am to add the domain under Authentication -> Sign in method under Oauth redirect domains.

I'm adding my domain foobar.io to the domain list, but I'm still getting the error:
"Unauthorized Request Origin
You are attempting to login with Google from the origin foobar.io, which is not in your list of approved request origins. To approve this origin, and view other Firebase Login settings, visit the Login & Auth tab in your Firebase's Dashboard. For more information, refer to the Login documentation."

Am I missing something?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/95c9a3f0-8172-456c-b898-c326f836c7e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christophe Geiser

unread,
Jun 15, 2016, 11:10:47 AM6/15/16
to Firebase Google Group
Having similar issues, but in my case using Firebase 2.x.x SDK (polymer firebase-auth) for a project that has been migrated from the legacy dashboard to https://console.firebase.google.com/project/...: 

I cannot use google OAuth to login from my custom hosting domain : 


Worth noting, I have added the custom hosing domain and the authorized for OAuth redirects after the migration.

If it is indeed not supposed to be working under those conditions - a clear warning/info message should be shown to users before the migration (e.g you will not be able to use OAuth for custom hosting domain after migration ...)

Cheers,
Christophe

meme...@firebase.com

unread,
Jun 15, 2016, 1:38:46 PM6/15/16
to Firebase Google Group
This could be a bug that we discovered earlier this week.  In some cases new authorized domains that have been added to projects at console.firebase.google.com were not propagated correctly and so when using OAuth via the 2.x SDKs you would continue to get the "Unauthorized Request Origin" error.  Don't fear though, I've already got a fix for this ready and I'm going to be rolling it out soon.  Once I've verified that it it working I'll ping this thread again and ask you two to try it out again and see if it resolves your issues.

Sorry for the problems,
Alex

meme...@firebase.com

unread,
Jun 15, 2016, 8:20:05 PM6/15/16
to Firebase Google Group
Okay, I've just gotten a fixed pushed out that I believe should solve these problems.  If you don't mind, please double check that you're no longer getting these errors.  Please note that if you add a new authorized domain it could take up to 5 minutes for the changes to propagate for the 2.x SDKs (this also something that I'll be trying to improve).

Hopefully this helps,
Alex

Christophe Geiser

unread,
Jun 16, 2016, 10:27:46 AM6/16/16
to Firebase Google Group
Thanks a lot for this rapid action, Alex, truly appreciated!

I am afraid I still get the error :  You are attempting to login with Google from the origin test.preignition.org, which is not in your list of approved request origins... 

What I have done : 
- removed custom domain (and sub-domain) from OAuth redirect domains (https://console.firebase.google.com/project/[appID]/authentication/providers)
- put them back to make sure a domain change is happening somewhere
- waited for some time (more than 20min) 

It is working from localhost and the default [myapp].firebaseapp.com, as before.

Cheers, 
C.

meme...@firebase.com

unread,
Jun 16, 2016, 11:25:35 AM6/16/16
to Firebase Google Group
Yes, unfortunately we had to rollback the code that I had deployed earlier as a new bug was introduced.  I've already got a fix for that bug and we will be doing another deployment sometime today.  Once it has gone out and I verified it then I'll respond back here (again) and let you know.

Sorry about all of the delays on this,
Alex

meme...@firebase.com

unread,
Jun 16, 2016, 2:59:13 PM6/16/16
to Firebase Google Group
Alright, we've done another deploy and I've verified that it works for the test cases that I've seen.  Please give it another try and let me know if its still giving you any trouble.

-Alex

Christophe Geiser

unread,
Jun 17, 2016, 10:53:19 AM6/17/16
to Firebase Google Group
It is now working great ! 
Thanks a lot for the reactivity ; ) 
C.
Reply all
Reply to author
Forward
0 new messages