Skip to main content
In this guide, you’ll learn how to:
  • Set up Google Cloud credentials so Google sign-in works in your APK.
  • Configure Supabase to handle Google authentication for Android.
  • Get sign-in working end-to-end on a real device or emulator.
APK only:
When Google auth is configured through Supabase, Google sign-in for mobile apps will not work in Rocket’s preview or in published apps. It will only work in a downloaded APK installed on a real device or emulator.

Your SHA-1 Certificate Fingerprint

Rocket has generated this value for your app. You will need to paste it into Google Cloud Console in the Create the Android OAuth Client ID step below.
Your SHA-1 Fingerprint
AB:CD:12:34:EF:56:78:90:AB:CD:12:34:EF:56:78:90:AB:CD:12:34
Copy this value exactly. You will paste it in the Create the Android OAuth Client ID step.
Use copy-paste only. Do not type this manually. A single wrong character will prevent users from signing in.

Step 1: Google Cloud Console

1

Create or select your project

  1. Go to console.cloud.google.com and sign in.
  2. Click the project selector at the top of the page.
  3. Select your existing project, or click New Project, give it a name, and click Create.
2

Set up the OAuth Consent Screen

This is the screen your users see when Google asks for permission to share their account details with your app.
  1. In the sidebar, go to APIs & Services > OAuth consent screen.
  2. Select External and click Create.
  3. Fill in the required fields: App name, User support email, and Developer contact email.
  4. Click Save and Continue on each screen until you reach the Summary, then click Back to Dashboard.
Leave the app in Testing mode for now. Add your own Google account as a test user so you can sign in during testing.
3

Create the Android OAuth Client ID

This credential identifies your app to Google during sign-in.
  1. Go to APIs & Services > Credentials and click + Create Credentials > OAuth client ID.
  2. Set Application type to Android.
  3. Fill in the following:
FieldValue
Namee.g. MyApp Android
Package namePaste the value from your Rocket email
SHA-1 certificate fingerprintPaste the SHA-1 value from the top of this page
  1. Click Create, then OK.
Always paste the SHA-1 value rather than typing it manually. A single incorrect character will prevent users from signing in.
4

Create the Web OAuth Client ID

Supabase requires a separate Web Client ID to handle authentication on your behalf.
  1. Click + Create Credentials > OAuth client ID again.
  2. Set Application type to Web application.
  3. Name it e.g. MyApp Web (Supabase).
  4. Under Authorised redirect URIs, click + Add URI and enter:
https://<your-project-ref>.supabase.co/auth/v1/callback
Replace <your-project-ref> with your Supabase project reference. Find it in Supabase under Settings > General.
  1. Click Create.
  2. A dialog shows your Client ID and Client Secret. Copy and save both. You will need them in the Enable Google sign-in step.
Keep your Client Secret private. Never share it publicly or include it in your app’s code.

Step 2: Configure Supabase

1

Enable Google sign-in

  1. Log in to supabase.com and open your project.
  2. Go to Authentication > Providers in the sidebar.
  3. Find Google, click to expand it, and toggle Enable sign in with Google to ON.
  4. Paste the Web Client ID and Client Secret you saved in the Create the Web OAuth Client ID step.
  5. Click Save.
2

Add the redirect URL

  1. In the sidebar, go to Authentication > URL Configuration.
  2. Under Redirect URLs, click Add URL and enter:
com.yourcompany.appname://login-callback
Replace com.yourcompany.appname with your actual package name from the Rocket email.
  1. Click Save.

Google sign-in is ready

Google Cloud Console and Supabase are configured. Google sign-in will now work in your APK.