Firebase Simple Login with Phonegap

1,090 views
Skip to first unread message

Hieu Nguyen

unread,
Aug 11, 2013, 9:31:49 PM8/11/13
to fireba...@googlegroups.com
Hi,
I'm building a phonegap app with firebase. My app uses Firebase Simple Login with facebook to log users in. It works fine on desktop but doesn't on mobile (error: Unauthorized request origin). How can I specify the Authorized Request Origins field so that it works on mobile?

Many thanks!

Erik Beeson

unread,
Aug 11, 2013, 9:45:45 PM8/11/13
to fireba...@googlegroups.com
I use firebase facebook login with phonegap and I haven't had that problem. Have you followed these instructions: https://www.firebase.com/docs/security/simple-login-facebook.html

Are you loading your phonegap app from a local file, or from a remote server? If it's from a remote server, you might need to add the domain to the Auth tab of your firebase.

--Erik



--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Rob DiMarco

unread,
Aug 11, 2013, 9:56:27 PM8/11/13
to fireba...@googlegroups.com
Hi Hieu -

Firebase Simple Login will work out-of-the-box in PhoneGap deployments provided that you have enabled the InAppBrowser plugin and are including the phonegap.js or cordova.js include in your application.

Also, check out a sample repository of using Firebase Simple Login in PhoneGap at https://github.com/firebase/firebase-simple-login-phonegap. Hope that helps!

Thanks -

Rob


On Sun, Aug 11, 2013 at 6:31 PM, Hieu Nguyen <hieu....@gmail.com> wrote:

Joey Hipolito

unread,
Mar 2, 2014, 7:10:48 AM3/2/14
to fireba...@googlegroups.com
Rob, 

I am receiving a white screen after logging in, was it because the cordova.js included was for ios and i was using android? Where is cordova.js for android? or phonegap

Rob DiMarco

unread,
Mar 3, 2014, 12:14:26 AM3/3/14
to fireba...@googlegroups.com
Hi Joey -

The published example does use a version of cordova.js for iOS, but a standard, off-the-shelf one for Android should work well for that platform, as long as the PhoneGap InAppBrowser is enabled and included in your application. You can download cordova.js / phonegap.js from http://phonegap.com/install/.

Thanks, and let me know if you have any other questions.

Rob


Reply all
Reply to author
Forward
0 new messages