Include email and profile scopes in OIDC authentication requests

This commit is contained in:
Maurus Decimus
2026-04-30 12:11:40 +02:00
parent 2344c96651
commit a3376b0a7d
2 changed files with 18 additions and 6 deletions
+10
View File
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
## [1.0.2] - 2026-04-30
### Added
- OIDC:
- Include `email` and `profile` scopes in OIDC authentication requests.
### Changed
### Fixed
## [1.0.1] - 2026-04-25 ## [1.0.1] - 2026-04-25
### Added ### Added
+8 -6
View File
@@ -163,12 +163,14 @@ export async function startAuthFlow(username: string, returnUrl?: string | null)
prompt: 'login', prompt: 'login',
}); });
const scope = let scope: string;
SCOPES && SCOPES.length > 0 if (SCOPES && SCOPES.length > 0) {
? SCOPES scope = SCOPES;
: scopes_supported?.includes('openid') } else if (scopes_supported?.includes('openid')) {
? 'openid' scope = ['openid', 'email', 'profile'].filter((s) => scopes_supported.includes(s)).join(' ');
: ''; } else {
scope = '';
}
if (scope) { if (scope) {
params.set('scope', scope); params.set('scope', scope);
} }