JS SDK. I am using the Google authentication with redirect but I can't get it to work. I have two flows:First, User presses Login button I then call
ref.authWithOAuthRedirect("google", reject, {scope: 'email'});
I am redirected to google.com, finish the authentication, redirected back to my app with a query parameter __firebase_request_key. But then nothing... both ref.getAuth() and ref.onAuth(function(authData){}) return authData == null.
Second, App starts if a user is already logged-in I would like to get the token and call ref.authWithCustomToken(...) without redirect or any action needed from the user
Please advice
Thanks
Gil
--
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/d748a55c-012f-4e77-9b2e-6631ee13966f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Gil,If the user is already logged in, you wouldn't need to call anything other than onAuth() to detect login state. See persisting user auth state and monitoring user auth state.authWithCustomToken() is for creating your own auth workflow and signing your own tokens. Not for persisting auth state on restart.If these aren't working for you, then you'll need to provide a smallish repro and all the details needed to recreate the same conditions (e.g. are you using Ionic? Phonegap? Versions? Steps? Sample data?). I'd also recommend checking the console for errors and turning on debug logging:JS: Firebase.enableLogging(true);iOS: [Firebase setLoggingEnabled:YES];Android: Firebase.getDefaultConfig().setLogLevel(Logger.Level.DEBUG);☼, Kato
Hey Kato,
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/25c3caed-4bfb-44ad-b267-77a20bcaa4a7%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/SknsQu9tbnY/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAGcMwsD%3DhyB5niYjyXBG%3D8b7%2B4fzRChP7FsAWbbtMBnF_-eRnQ%40mail.gmail.com.