Skip to content

Commit bf1de6c

Browse files
Uchehensmikehardy
andauthored
docs(auth, social): Play Store APIs required for google sign in (#6606)
* 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 <[email protected]>
1 parent b83a929 commit bf1de6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/auth/social-auth.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ import auth from '@react-native-firebase/auth';
285285
import { GoogleSignin } from '@react-native-google-signin/google-signin';
286286

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

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

299301
Upon successful sign-in, any [`onAuthStateChanged`](/auth/usage#listening-to-authentication-state) listeners will trigger
300302
with the new authentication state of the user.
303+
304+
If you are testing this feature on an android emulator ensure that the emulate is either the Google APIs or Google Play flavor.

0 commit comments

Comments
 (0)