fix(oauth2): request the email scope from the OIDC provider

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'.
This commit is contained in:
2026-09-21 23:14:51 +08:00
parent 73ce8162aa
commit 77b9e72388
+1 -1
View File
@@ -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