From 77b9e7238830a466c43997b7912457885491043a15cfe38f9bcb9169a850e73c Mon Sep 17 00:00:00 2001 From: Maoayo233 Date: Mon, 21 Sep 2026 23:14:51 +0800 Subject: [PATCH] fix(oauth2): request the email scope from the OIDC provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gitea maps the standard email claim during auto-registration, but the provider only returns email when the email scope is requested. Adding it here (the IdP also now allows the email scope for the tjhlp-gitea client) fixes 'OAuth2 提供商返回缺失的字段: email'. --- deploy/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/compose.yaml b/deploy/compose.yaml index 5a646b8..dc26689 100644 --- a/deploy/compose.yaml +++ b/deploy/compose.yaml @@ -153,7 +153,7 @@ services: # --- OIDC / OAuth2 -------------------------------------------------- GITEA__openid__ENABLE_OPENID_SIGNIN: "false" GITEA__openid__ENABLE_OPENID_SIGNUP: "true" - GITEA__oauth2_client__OPENID_CONNECT_SCOPES: profile + GITEA__oauth2_client__OPENID_CONNECT_SCOPES: profile email GITEA__oauth2_client__ENABLE_AUTO_REGISTRATION: "true" GITEA__oauth2_client__USERNAME: userid GITEA__oauth2_client__ACCOUNT_LINKING: auto