diff --git a/admin_frontend/assets/apple/logo.html b/admin_frontend/assets/apple/logo.html new file mode 100644 index 00000000..5bde963f --- /dev/null +++ b/admin_frontend/assets/apple/logo.html @@ -0,0 +1,3 @@ + + + diff --git a/admin_frontend/assets/discord/logo.html b/admin_frontend/assets/discord/logo.html index 37ade75e..60218dd4 100644 --- a/admin_frontend/assets/discord/logo.html +++ b/admin_frontend/assets/discord/logo.html @@ -1,4 +1,4 @@ - + -
-
-
- - - - - - - -
- Sign in with Google -
- + + + + + + + diff --git a/deploy.env b/deploy.env index 8ee278c3..1f2788fc 100644 --- a/deploy.env +++ b/deploy.env @@ -70,6 +70,11 @@ GOTRUE_EXTERNAL_DISCORD_ENABLED=false GOTRUE_EXTERNAL_DISCORD_CLIENT_ID= GOTRUE_EXTERNAL_DISCORD_SECRET= GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://your-host/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 # File Storage # This is where storage like images, files, etc. will be stored @@ -121,4 +126,4 @@ APPFLOWY_HISTORY_DATABASE_URL=postgres://postgres:password@postgres:5432/postgre # AppFlowy Indexer APPFLOWY_INDEXER_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres -APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379 \ No newline at end of file +APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 98da16c8..97c7fae4 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -72,6 +72,11 @@ services: - GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=${GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID} - GOTRUE_EXTERNAL_GOOGLE_SECRET=${GOTRUE_EXTERNAL_GOOGLE_SECRET} - GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=${GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI} + # Apple OAuth config + - GOTRUE_EXTERNAL_APPLE_ENABLED=${GOTRUE_EXTERNAL_APPLE_ENABLED} + - GOTRUE_EXTERNAL_APPLE_CLIENT_ID=${GOTRUE_EXTERNAL_APPLE_CLIENT_ID} + - GOTRUE_EXTERNAL_APPLE_SECRET=${GOTRUE_EXTERNAL_APPLE_SECRET} + - GOTRUE_EXTERNAL_APPLE_REDIRECT_URI=${GOTRUE_EXTERNAL_APPLE_REDIRECT_URI} # GITHUB OAuth config - GOTRUE_EXTERNAL_GITHUB_ENABLED=${GOTRUE_EXTERNAL_GITHUB_ENABLED} - GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=${GOTRUE_EXTERNAL_GITHUB_CLIENT_ID} diff --git a/docker/gotrue.Dockerfile b/docker/gotrue.Dockerfile index 4831b37f..193f5d63 100644 --- a/docker/gotrue.Dockerfile +++ b/docker/gotrue.Dockerfile @@ -1,6 +1,6 @@ FROM golang as base WORKDIR /go/src/supabase -RUN git clone https://github.com/supabase/gotrue.git --depth 1 --branch v2.117.0 +RUN git clone https://github.com/supabase/gotrue.git --depth 1 --branch v2.159.1 WORKDIR /go/src/supabase/gotrue COPY docker/gotrue.patch . RUN git apply gotrue.patch diff --git a/docker/gotrue.patch b/docker/gotrue.patch index 45d30103..651e62b8 100644 --- a/docker/gotrue.patch +++ b/docker/gotrue.patch @@ -1,25 +1,12 @@ -diff --git a/internal/api/api.go b/internal/api/api.go -index d9016fd0..924ce018 100644 ---- a/internal/api/api.go -+++ b/internal/api/api.go -@@ -175,7 +175,7 @@ func NewAPIWithVersion(ctx context.Context, globalConfig *conf.GlobalConfigurati - }) +diff --git a/internal/api/settings.go b/internal/api/settings.go +index bc2f3869..c0025f48 100644 +--- a/internal/api/settings.go ++++ b/internal/api/settings.go +@@ -36,6 +36,7 @@ type Settings struct { + MailerAutoconfirm bool `json:"mailer_autoconfirm"` + PhoneAutoconfirm bool `json:"phone_autoconfirm"` + SmsProvider string `json:"sms_provider"` ++ MFAEnabled bool `json:"mfa_enabled"` // preserve for backwards compatibility + SAMLEnabled bool `json:"saml_enabled"` + } - r.Route("/sso", func(r *router) { -- r.Use(api.requireSAMLEnabled) -+ // r.Use(api.requireSAMLEnabled) - r.With(api.limitHandler( - // Allow requests at the specified rate per 5 minutes. - tollbooth.NewLimiter(api.config.RateLimitSso/(60*5), &limiter.ExpirableOptions{ -diff --git a/internal/api/saml.go b/internal/api/saml.go -index d936ff2f..011d098c 100644 ---- a/internal/api/saml.go -+++ b/internal/api/saml.go -@@ -24,6 +24,7 @@ func (a *API) getSAMLServiceProvider(identityProvider *saml.EntityDescriptor, id - externalURL.Path += "/" - } - -+ externalURL.Path += "gotrue/" - externalURL.Path += "sso/" - - provider := samlsp.DefaultServiceProvider(samlsp.Options{