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
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,
,
you can use debug.keystore to generate the figureprint
- 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
EXPO Google Sign Plugin
install and configure expo plugin, make sure you have
done things below,
- configurate PLUGIN section in app.config.js
- import and call the GoogleSign
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
- Check the SHA-1 figureprint of Android Client
- Check the Package name of Android Client
- Don't forget to configure webClient before call GoogleSignIn
Enable Supabase's Google Auth Provider
- go to this link
- scroll and choose Google, then fill into ClientId and Client Scret of your Google WebClient !!!!