Skip to content

Commit

Permalink
docs(auth, social): Play Store APIs required for google sign in (#6606)
Browse files Browse the repository at this point in the history
* For Google Authentication on Emulator Google Play Store is Required 

For google authentication Google Play store is required to be installed and updated to prevents errors like [Error: A non-recoverable sign in failure occurred]

* Update docs/auth/social-auth.md

Co-authored-by: Mike Hardy <github@mikehardy.net>
  • Loading branch information
Uchehens and mikehardy authored Oct 17, 2022
1 parent b83a929 commit bf1de6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/auth/social-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ import auth from '@react-native-firebase/auth';
import { GoogleSignin } from '@react-native-google-signin/google-signin';

async function onGoogleButtonPress() {
// Check if your device supports Google Play
await GoogleSignin.hasPlayServices({ showPlayServicesUpdateDialog: true });
// Get the users ID token
const { idToken } = await GoogleSignin.signIn();

Expand All @@ -298,3 +300,5 @@ async function onGoogleButtonPress() {

Upon successful sign-in, any [`onAuthStateChanged`](/auth/usage#listening-to-authentication-state) listeners will trigger
with the new authentication state of the user.

If you are testing this feature on an android emulator ensure that the emulate is either the Google APIs or Google Play flavor.

1 comment on commit bf1de6c

@vercel
Copy link

@vercel vercel bot commented on bf1de6c Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.