feat: SSO切换账号按钮 + 生产配置模板

This commit is contained in:
gitadmin 2026-07-03 12:12:11 +08:00
parent 9986d99ab3
commit 62016cf105
2 changed files with 20 additions and 0 deletions

15
config/.env.prod Normal file
View File

@ -0,0 +1,15 @@
# assets-ai 生产环境配置(模板)
DATABASE_PATH=/app/data/assets.db
JWT_SECRET=__JWT_SECRET__
COOKIE_DOMAIN=.tlyq.ai
NODE_ENV=production
NODE_TLS_REJECT_UNAUTHORIZED=0
LDAP_URL=ldap://lldap:3890
LDAP_BASE_DN=dc=tlyq,dc=ai
LDAP_ADMIN_DN=uid=admin,ou=people,dc=tlyq,dc=ai
AUTHELIA_URL=https://sso.tlyq.ai
OIDC_CLIENT_ID=assets-oidc
OIDC_CLIENT_SECRET=__OIDC_CLIENT_SECRET__
OIDC_REDIRECT_URI=https://assets.tlyq.ai/api/auth/callback
ISSUE_API_URL=http://issue-ai:3000/api
NEXT_PUBLIC_ISSUE_URL=https://issue.tlyq.ai/tickets

View File

@ -38,6 +38,11 @@ export function LoginForm() {
</button>
<p className="text-center text-xs text-slate-400 mb-3"> SSO </p>
<p className="text-center mb-2">
<button onClick={() => { window.location.href = '/api/auth/login/oidc?switch=1' }} className="text-xs text-slate-400 hover:text-slate-600 underline">
使
</button>
</p>
<p className="text-center">
<button onClick={() => setShowLdapForm(true)} className="text-xs text-slate-400 hover:text-slate-600 underline">
使 LDAP