We are using Google OAuth credentials for local supabase authentication.
For this implementation, I assuem that You already successfully running dev version of supabase and web UI
If you already running supabase that Hazal created, you need to move .env.local file under web.
Assume that you are under the root folder
copy .env.local into web
cp ./server/.env.local ./web
Go to server folder and update supabase configuration
cd server/supabase
Paste this content inside of config.toml
[auth.external.google]
enabled = true
client_id = "YOUR_GOOGLE_CREDENTIALS_CLIENT_ID"
# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
secret = "YOUR_GOOGLE_CREDENTIALS_SECRET"
# Overrides the default auth redirectUrl.
redirect_uri = "http://localhost:54321/auth/v1/callback"
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
# or any other third-party OIDC providers.
url = ""
replace YOUR_GOOGLE_CREDENTIALS_CLIENT_ID and YOUR_GOOGLE_CREDENTIALS_SECRET into your google oauth credentials. If you don't have any credentials availabe, you can either create your own or I can provide you mine.
If you are using your own credentials, make sure that you properly added authorized javascript and redirect URIs like;
couple comments after that we are good to merge:
1- in the auth enabled=true
2- google oauth creds should be created with the domain url (which is currently our local) and supabase API url.
We are using Google OAuth credentials for local supabase authentication.
For this implementation, I assuem that You already successfully running
dev
version of supabase and web UIIf you already running supabase that Hazal created, you need to move
.env.local
file underweb
..env.local
intoweb
server
folder and updatesupabase
configurationPaste this content inside of
config.toml
replace
YOUR_GOOGLE_CREDENTIALS_CLIENT_ID
andYOUR_GOOGLE_CREDENTIALS_SECRET
into your google oauth credentials. If you don't have any credentials availabe, you can either create your own or I can provide you mine.If you are using your own credentials, make sure that you properly added authorized javascript and redirect URIs like;
http://localhost:3000 http://localhost:54321/auth/v1/callback
To generate Google Credentials, you can follow this tutorial.