react-native-proxy
Prerequisite:
- If you're using RN >= 0.73, you're good to go.
- Project in GCP Console
- NON FIREBASE PROJECT
FOR ANDROID ONLY
step 1: Install dependencies npm install react-native-proxy npm install @react-native-async-storage/async-storage npm install @react-native-google-signin/google-signin npm install react-native-quick-crypto npm install buffer
step 2: Code (Show google login/signin button) import ShowGoogleLoginButton from 'react-native-proxy'
<ShowGoogleLoginButton referenceId= onLoginSuccess={handleLoginSuccess} onLoginFailure={handleLoginFailure} />
Step 3: Google Cloud Console Configuation
Configure SHA1 key for debug
- From your project root, cd android && ./gradlew signingReport.
- Scroll to the top of output, see the fingerprints. Debug fingerprint is used for debug apk, release fingerprint is used for release APK.
- Select "When not using Firebase" tab Add SHA1 Key on google cloud console ( https://react-native-google-signin.github.io/docs/setting-up/get-config-file?firebase-or-not=cloud-console#step-2 )
Important:
- Map correct SHA1 to GCP consile
- Map correct package name to GCP console
FOR IOS ONLY To use this on iOS, you must manually configure the following:
- for Sign-In with Apple
Ensure you have the following setup on proxy dashboard under apple authentication feature:
- App ID
- Client ID
- Key ID
- .p8 private key file from Apple Developer → Keys section
These are required for handling Google Sign-In via Apple.
- Sign-In via Google
- Configure URL Scheme
- Open your Info.plist and add:
CFBundleURLTypes CFBundleURLSchemes com.googleusercontent.apps.YOUR_CLIENT_ID
Replace YOUR_CLIENT_ID with the one from your GCP console (without .apps.googleusercontent.com suffix).
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library