config/identity-providers.php

حُدِّث 2026-11-22
On this page

本页由 code-scripts/docgen.php 生成,改代码后重新生成即可;手改会被覆盖。

来源:config/identity-providers.php

第三方登录的预设。后台「登录方式」里可以逐字段覆盖,这张表只是新建提供方时的初始值;字段名对应各家 userinfo 返回的 JSON 键。

共 56 项。

github

键环境变量默认值说明
github.logo—/assets/providers/github.svg按钮上的图标地址,留空回退成首字母
github.name—GitHub显示名
github.type—oauth2协议类型,目前只有 oauth2
github.authorize_url—https://github.com/login/oauth/authorize授权页地址,浏览器跳过去的地方
github.token_url—https://github.com/login/oauth/access_token换 token 的地址
github.userinfo_url—https://api.github.com/user取用户资料的地址
github.emails_url—https://api.github.com/user/emails取邮箱列表的地址,留空就不查
github.scopes—read:user user:email请求的 scope,空格分隔
github.subject_field—id用户资料里当唯一 ID 的字段
github.email_field—email邮箱字段
github.name_field—name昵称字段
github.avatar_field—avatar_url头像字段
github.email_verified_field—''「邮箱是否已验证」的字段;留空表示信任对方返回的邮箱
github.token_auth—post换 token 时凭据放哪:post 放表单,basic 放 Authorization 头

google

键环境变量默认值说明
google.logo—/assets/providers/google.svg按钮上的图标地址,留空回退成首字母
google.name—Google显示名
google.type—oidc协议类型,目前只有 oauth2
google.authorize_url—https://accounts.google.com/o/oauth2/v2/auth授权页地址,浏览器跳过去的地方
google.token_url—https://oauth2.googleapis.com/token换 token 的地址
google.userinfo_url—https://openidconnect.googleapis.com/v1/userinfo取用户资料的地址
google.emails_url—''取邮箱列表的地址,留空就不查
google.scopes—openid profile email请求的 scope,空格分隔
google.subject_field—sub用户资料里当唯一 ID 的字段
google.email_field—email邮箱字段
google.name_field—name昵称字段
google.avatar_field—picture头像字段
google.email_verified_field—email_verified「邮箱是否已验证」的字段;留空表示信任对方返回的邮箱
google.token_auth—post换 token 时凭据放哪:post 放表单,basic 放 Authorization 头

microsoft

键环境变量默认值说明
microsoft.logo—/assets/providers/microsoft.svg按钮上的图标地址,留空回退成首字母
microsoft.name—Microsoft显示名
microsoft.type—oidc协议类型,目前只有 oauth2
microsoft.authorize_url—https://login.microsoftonline.com/common/oauth2/v2.0/authorize授权页地址,浏览器跳过去的地方
microsoft.token_url—https://login.microsoftonline.com/common/oauth2/v2.0/token换 token 的地址
microsoft.userinfo_url—https://graph.microsoft.com/oidc/userinfo取用户资料的地址
microsoft.emails_url—''取邮箱列表的地址,留空就不查
microsoft.scopes—openid profile email请求的 scope,空格分隔
microsoft.subject_field—sub用户资料里当唯一 ID 的字段
microsoft.email_field—email邮箱字段
microsoft.name_field—name昵称字段
microsoft.avatar_field—picture头像字段
microsoft.email_verified_field—''「邮箱是否已验证」的字段;留空表示信任对方返回的邮箱
microsoft.token_auth—post换 token 时凭据放哪:post 放表单,basic 放 Authorization 头

caellabid

键环境变量默认值说明
caellabid.logo—/assets/providers/caellabid.svg按钮上的图标地址,留空回退成首字母
caellabid.name—CaelLabID显示名
caellabid.type—oidc协议类型,目前只有 oauth2
caellabid.authorize_url—https://id.caellab.com/oauth/authorize授权页地址,浏览器跳过去的地方
caellabid.token_url—https://id.caellab.com/oauth/token换 token 的地址
caellabid.userinfo_url—https://id.caellab.com/api/userinfo取用户资料的地址
caellabid.emails_url—''取邮箱列表的地址,留空就不查
caellabid.scopes—openid profile请求的 scope,空格分隔
caellabid.subject_field—sub用户资料里当唯一 ID 的字段
caellabid.email_field—email邮箱字段
caellabid.name_field—display_name昵称字段
caellabid.avatar_field—avatar头像字段
caellabid.email_verified_field—''「邮箱是否已验证」的字段;留空表示信任对方返回的邮箱
caellabid.token_auth—post换 token 时凭据放哪:post 放表单,basic 放 Authorization 头