Google Sign-In with React Native and Expo: IOS & Android 2021

1 CODE: IOS & ANDROID Google Login on Expo SDK 40.0.0 (updated!)

src: pixabay.com, wikimedia

App Setup

On your terminal input the following commands:

npm install -g expo-cli expo init your-project-namecd your-project-nameexpo install @react-navigation/native react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view @react-navigation/stackexpo install expo-google-app-authexpo start

Coding time!

Warning: After coding, you have to setup the app on the Google Console. It won’t work until you do so.

Google Console Project Setup

Create a new Google Console project on the following link:

IOS Setup

We have to tell Google that our specific app is trying to login from each platform. Let’s start with IOS.

Add iOS URL scheme to your app.json file

Click on the ios-client Name of your credentials page. It’ll take you here:

Android Setup

Similar process, create OAuth client ID

Founder @ Snowball Financial Education www.snowballfinances.com | Javascript Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store