Oauth 2.0 google-signin + firebase on expo react native

564 views
Skip to first unread message

Rafael Rocha

unread,
Sep 6, 2022, 11:54:29 PM9/6/22
to Firebase Google Group
I'm making an android app with expo and need to make a google-signin. I made the login system with GCP's  (Google Cloud Platform) Oauth 2.0 and now I'm trying to connect this login with Firebase to use the onAuthStateChanged function, but I can't get it to work (tried signInWithCredential). Is there any way to really do this connection or I'm just doing it wrong?

Nick Adams

unread,
Sep 7, 2022, 1:07:09 PM9/7/22
to fireba...@googlegroups.com
Make sure you added the sha1 into the firebase project as a finger print. This is under projects settings in the firebase console.
You can generate the sha1 hash using the signingReport tool under gradle tools in android studio.
After that, download a new google services json and replace the old one you have locally in your project.
You may also need to check if you are providing the OAuth2 client ID when initially building the GoogleSignInOptions.
If you have a release on google play then, you’ll need to add additional hashes to the project which can be found in the google play console 


On Tue, Sep 6, 2022 at 11:54 PM Rafael Rocha <faelrr...@gmail.com> wrote:
I'm making an android app with expo and need to make a google-signin. I made the login system with GCP's  (Google Cloud Platform) Oauth 2.0 and now I'm trying to connect this login with Firebase to use the onAuthStateChanged function, but I can't get it to work (tried signInWithCredential). Is there any way to really do this connection or I'm just doing it wrong?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/ad37c008-d86f-470f-9a93-63897bd00fe9n%40googlegroups.com.

Nick Adams

unread,
Sep 7, 2022, 1:07:09 PM9/7/22
to fireba...@googlegroups.com
Also recently, I had to do this whole thing again for another app and found this page with a button that does the cloud configuration for you
Reply all
Reply to author
Forward
0 new messages