Sample react native app with google sign in authentification feature
- Used react-native-google-signin/google-signin library link -> https://github.com/react-native-google-signin/google-signin.
- Support all 3 types of authentication methods (standard, with server-side validation or with offline access (aka server-side access))
- Promise-based API consistent between Android and iOS
- Typings for TypeScript and Flow
- Mock of the native module for testing with Jest Native sign in buttons
- You need to install react-native-google-signin/google-signin. Link -> https://github.com/react-native-google-signin/google-signin.
- Create a new project with google cloud console link -> https://console.cloud.google.com/?project=alpine-tempo-403807
- Create a credential Oauth client id from API & Services tab under your project.
- Application type is Android ,you will need package name and SHA 1 certificate fingerprint of android app to proceed.
- You will also need to generate another credential Oauth client id in the same project this time application type should be web application.
- Use the web client id from web application OAuth 2.0 Client ID in configuration google sign in as illustrated in link -> https://github.com/react-native-google-signin/google-signin#configureoptions-void
- Please read https://github.com/react-native-google-signin/google-signin for more explanation about implementation aspect of google auth sign in.
![](https://private-user-images.githubusercontent.com/98744068/279887145-2cdaccd6-2bd9-4f79-b944-1f73b1e7f0d2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5NzQxMjIsIm5iZiI6MTcyNTk3MzgyMiwicGF0aCI6Ii85ODc0NDA2OC8yNzk4ODcxNDUtMmNkYWNjZDYtMmJkOS00Zjc5LWI5NDQtMWY3M2IxZTdmMGQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDEzMTAyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM1OTVjMTE5NWY0N2RhZmYx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