Sign in with Google on Expo React Native Android

First make sure you have completed the Google OAuth Web page.

  • We need Supabase to be setup.
1

First of all, you need to create a new project in the Google Cloud Console if you don’t have one already.

2

Click the APIs & Services menu.

3

Click the Credentials menu.

4

Then click the Create Credentials button.

  • Please select OAuth client ID
5

But you need to Configure Consent Screen first.

6

Oops! There is a problem here. We need to fix it. Go to Expo and create a new project if you don’t have one already.

7

Open your terminal in your project folder.

  • Run eas credentials
  • Select Android
  • Select development
  • get your SHA1 Fingerprint.
8

  1. Then go back to Google Cloud Console and fill the form.
  2. Paste your https://<project-ref>.supabase.co/auth/v1/callback in the Authorized redirect URIs field.
  3. Click the Save button.
9

Copy your Android Client ID and go to .env file.

10

Add your Android Client ID to the .env file.

EXPO_PUBLIC_GOOGLE_OAUTH_ANDROID_CLIENT_ID=some-id.apps.googleusercontent.com