From e07f658e9cfa7d1f6b560770f4f614e8000ccf8c Mon Sep 17 00:00:00 2001 From: ThanatosDi Date: Wed, 23 Oct 2024 10:29:01 +0800 Subject: [PATCH] feat: reuse API_EXTERNAL_URL variable for gotrue redirect URI --- deploy.env | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy.env b/deploy.env index c7251cd4..d4f8e911 100644 --- a/deploy.env +++ b/deploy.env @@ -68,6 +68,7 @@ GOTRUE_ADMIN_PASSWORD=password # Change this to your own domain where you host the docker-compose or gotrue # If you are using a different domain, you need to change the redirect_uri in the OAuth2 configuration # Make sure that this domain is accessible to the user +# Make sure no endswith / API_EXTERNAL_URL=http://your-host # In docker environment, `postgres` is the hostname of the postgres service @@ -79,22 +80,22 @@ GOTRUE_DATABASE_URL=postgres://${SUPABASE_USER}:${SUPABASE_PASSWORD}@${POSTGRES_ GOTRUE_EXTERNAL_GOOGLE_ENABLED=false GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID= GOTRUE_EXTERNAL_GOOGLE_SECRET= -GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://your-host/gotrue/callback +GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=${API_EXTERNAL_URL}/gotrue/callback # GitHub OAuth2 GOTRUE_EXTERNAL_GITHUB_ENABLED=false GOTRUE_EXTERNAL_GITHUB_CLIENT_ID= GOTRUE_EXTERNAL_GITHUB_SECRET= -GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=http://your-host/gotrue/callback +GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=${API_EXTERNAL_URL}/gotrue/callback # Discord OAuth2 GOTRUE_EXTERNAL_DISCORD_ENABLED=false GOTRUE_EXTERNAL_DISCORD_CLIENT_ID= GOTRUE_EXTERNAL_DISCORD_SECRET= -GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://your-host/gotrue/callback +GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=${API_EXTERNAL_URL}/gotrue/callback # Apple OAuth2 GOTRUE_EXTERNAL_APPLE_ENABLED=false GOTRUE_EXTERNAL_APPLE_CLIENT_ID= GOTRUE_EXTERNAL_APPLE_SECRET= -GOTRUE_EXTERNAL_APPLE_REDIRECT_URI=http://your-host/gotrue/callback +GOTRUE_EXTERNAL_APPLE_REDIRECT_URI=${API_EXTERNAL_URL}/gotrue/callback # File Storage # Create the bucket if not exists on AppFlowy Cloud start up.