From ea7ad2aaa096f8d190d740f693f22f3ed1f05088 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 6 Aug 2024 10:38:19 +0200 Subject: [PATCH] :sparkles: Add flag `oidc-registration` for switch on/off registration with oidc --- CHANGES.md | 1 + backend/src/app/auth/oidc.clj | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 09c8cb0b4..5544b031e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ - User switch language to "zh_hant" will get 400 [Github #4884](https://github.com/penpot/penpot/issues/4884) - Smtp config ignoring port if ssl is set [Github #4872](https://github.com/penpot/penpot/issues/4872) +- Ability to let users to authenticate with a private oidc provider only [Github #4963](https://github.com/penpot/penpot/issues/4963) ## 2.1.1 diff --git a/backend/src/app/auth/oidc.clj b/backend/src/app/auth/oidc.clj index 18ecf718a..252f7e3cb 100644 --- a/backend/src/app/auth/oidc.clj +++ b/backend/src/app/auth/oidc.clj @@ -592,7 +592,8 @@ :else (let [info (assoc info :is-active (provider-has-email-verified? cfg info))] - (if (contains? cf/flags :registration) + (if (or (contains? cf/flags :registration) + (contains? cf/flags :oidc-registration)) (redirect-to-register cfg info request) (redirect-with-error "registration-disabled")))))