简体   繁体   中英

Firebase and Facebook and Google login

I'm using the https://github.com/ciptohadi79/angularjsfire-with-reg-confirmation as a template for my project, but when I try to login with facebook I always get a pop up error message saying :

"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

It works with Twitter. I think there is something in the Valid OAuth redirect URIs that Facebook doesn't like. My firebase is called marcocast so I put :

https://auth.firebase.com/v2/marcocast/auth/facebook/callback

When I try with other examples (like firefeed), the facebook login works.

Any idea why? Is it possible that is because there is a # in the url ( https://marcocast.firebaseapp.com/#/home )?

Thanks

The template you referenced uses a very old version of AngularFire (0.7.2). The latest version of AngularFire (0.9) uses the new Firebase auth methods instead of the deprecated Simple Login library.

Your callback URL is for the new Firebase Login methods, hence the v2 in the URL. Therefore to get it working properly you'll have to upgrade to latest version of Firebase (2.0.6 at the time of this post) and the latest version of AngularFire (0.9).

Upgrading to AngularFire 0.9 from 0.7 will undoubtedly break your project. I would suggest using another template or checking out the AngularFire docs for further guidance .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM