feat: hardcode Logto org scopes in auth flow, hide from admin UI
Always include urn:logto:scope:organizations and urn:logto:scope:organization_roles in OIDC auth requests. These are required for role mapping in multi-tenant setups and harmless for non-Logto providers (unknown scopes ignored per OIDC spec). Filter them from the OIDC admin config page so they don't confuse standalone server admins or SaaS tenants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,8 @@ export function OidcCallback() {
|
||||
api.GET('/auth/oidc/config').then(({ data }) => {
|
||||
if (data?.authorizationEndpoint && data?.clientId) {
|
||||
const redirectUri = `${window.location.origin}${config.basePath}oidc/callback`;
|
||||
const scopes = ['openid', 'email', 'profile', ...(data.additionalScopes || [])];
|
||||
const PLATFORM_SCOPES = ['urn:logto:scope:organizations', 'urn:logto:scope:organization_roles'];
|
||||
const scopes = ['openid', 'email', 'profile', ...PLATFORM_SCOPES, ...(data.additionalScopes || [])];
|
||||
const p = new URLSearchParams({
|
||||
response_type: 'code',
|
||||
client_id: data.clientId,
|
||||
|
||||
Reference in New Issue
Block a user