Before implementing this library, you must configure your Google Cloud Console credentials correctly:
- Web Client ID: This is the only Client ID you will use inside your actual application code (such as your React components or configuration files).
- Android Client ID: You must create an Android Client ID in the Google Cloud Console and register your app's SHA-1 fingerprint to it.
Important: Do not use the Android Client ID in your React Native source code. The Android Client ID exists strictly for Google's servers to verify your application's SHA-1 signature behind the scenes. Your app code should only ever reference the Web Client ID.
- One Tap Sign-In (via Credential Manager)
- Account Chooser UI
- Legacy OAuth Support
- Scope Request
npm install @react-native-auth/googleyarn add @react-native-auth/googleFor detailed implementation examples, please refer to src/GoogleAuth.tsx.
This parameter controls the behavior of the authentication flow:
| Value | Behavior |
|---|---|
undefined |
Default behavior - no forced interaction |
'consent' |
Always show consent screen, even for an existing app |
'login' |
Always show login screen, force account selection |
'select_account' |
Always show account selection screen |
'none' |
Silent authentication (may fail if no session exists) |
For full type definitions, please refer to src/NativeGoogleAuth.ts.
