forked from WikiDeck/wikideck
account: only allow redirect URIs registered on Dex
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,8 +17,7 @@ export function oidcConfig(env: NodeJS.ProcessEnv = process.env): OidcConfig {
|
||||
const issuer = env.WIKIDECK_OIDC_ISSUER ?? 'https://dex.eom.dev/';
|
||||
const redirectUris = (env.WIKIDECK_OIDC_REDIRECT_URIS ??
|
||||
'http://192.168.1.32:3101/auth/callback,http://192.168.1.32:3102/auth/callback,' +
|
||||
'http://192.168.1.32:3103/auth/callback,dev.eom.wikideck:/oauth/callback,' +
|
||||
'http://127.0.0.1:5173/auth/callback,http://localhost:5173/auth/callback')
|
||||
'http://192.168.1.32:3103/auth/callback,dev.eom.wikideck:/oauth/callback')
|
||||
.split(',').map(s => s.trim()).filter(Boolean);
|
||||
return { issuer, clientId: env.WIKIDECK_OIDC_CLIENT_ID ?? 'wikideck',
|
||||
scopes: 'openid profile email groups', redirectUris, skew: 60 };
|
||||
|
||||
Reference in New Issue
Block a user