1. navigate to Google cloud dashboard, (if you have many google accounts logged in on the chrome, you need to toogle the account), add an New Project

Image description

Create OAuth Client ID

1 Follow on [the official document], create an Android Type Client ID(https://developers.google.com/workspace/guides/create-credentials?hl=en#oauth-client-id)
there is one thing you should be attention is:you need to privide a SHA-1 Certificate to fill in the form,

Image description,
you can use debug.keystore to generate the figureprint

Image description

  1. Create an Web Client Id, as we are using EXPO/ReactNative, we can't only use the AndriodClient, go to Dashboard > APIs & Services or just go to this url, then create the web client like below Image description

EXPO Google Sign Plugin

install and configure expo plugin, make sure you have
done things below
,

  1. configurate PLUGIN section in app.config.js Image description
  2. import and call the GoogleSign

Image description

then run pnpm android again to rebuild the app, add an button to call the function we defined,it will work.

Why I am failed

  1. Check the SHA-1 figureprint of Android Client
  2. Check the Package name of Android Client
  3. Don't forget to configure webClient before call GoogleSignIn

Enable Supabase's Google Auth Provider

  1. go to this link
  2. scroll and choose Google, then fill into ClientId and Client Scret of your Google WebClient !!!!

Image description

Next, create table in Supabase to save user's info