0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-22 01:22:32 -05:00

feat: add config variable to specify the requested OIDC sopes

This commit is contained in:
Elias Schneider 2024-11-25 12:21:17 +01:00
parent 468b25828b
commit da54ce6ee0
No known key found for this signature in database
GPG key ID: 07E623B294202B6C
3 changed files with 8 additions and 1 deletions

View file

@ -288,6 +288,10 @@ const configVariables: ConfigVariables = {
type: "boolean",
defaultValue: "false",
},
"oidc-scope": {
type: "string",
defaultValue: "openid email profile",
},
"oidc-usernameClaim": {
type: "string",
defaultValue: "",

View file

@ -70,7 +70,7 @@ export abstract class GenericOidcProvider implements OAuthProvider<OidcToken> {
new URLSearchParams({
client_id: this.config.get(`oauth.${this.name}-clientId`),
response_type: "code",
scope: "openid profile email",
scope: this.config.get(`oauth.${this.name}-scope`),
redirect_uri: this.getRedirectUri(),
state,
nonce,

View file

@ -566,6 +566,9 @@ export default {
"admin.config.oauth.oidc-sign-out": "Sign out from OpenID Connect",
"admin.config.oauth.oidc-sign-out.description":
"Whether the “Sign out” button will sign out from the OpenID Connect provider",
"admin.config.oauth.oidc-scope": "OpenID Connect scope",
"admin.config.oauth.oidc-scope.description":
"Scopes which should be requested from the OpenID Connect provider.",
"admin.config.oauth.oidc-username-claim": "OpenID Connect username claim",
"admin.config.oauth.oidc-username-claim.description":
"Username claim in OpenID Connect ID token. Leave it blank if you don't know what this config is.",