mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -05:00
feat: add config variable to specify the requested OIDC sopes
This commit is contained in:
parent
468b25828b
commit
da54ce6ee0
3 changed files with 8 additions and 1 deletions
|
@ -288,6 +288,10 @@ const configVariables: ConfigVariables = {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
defaultValue: "false",
|
defaultValue: "false",
|
||||||
},
|
},
|
||||||
|
"oidc-scope": {
|
||||||
|
type: "string",
|
||||||
|
defaultValue: "openid email profile",
|
||||||
|
},
|
||||||
"oidc-usernameClaim": {
|
"oidc-usernameClaim": {
|
||||||
type: "string",
|
type: "string",
|
||||||
defaultValue: "",
|
defaultValue: "",
|
||||||
|
|
|
@ -70,7 +70,7 @@ export abstract class GenericOidcProvider implements OAuthProvider<OidcToken> {
|
||||||
new URLSearchParams({
|
new URLSearchParams({
|
||||||
client_id: this.config.get(`oauth.${this.name}-clientId`),
|
client_id: this.config.get(`oauth.${this.name}-clientId`),
|
||||||
response_type: "code",
|
response_type: "code",
|
||||||
scope: "openid profile email",
|
scope: this.config.get(`oauth.${this.name}-scope`),
|
||||||
redirect_uri: this.getRedirectUri(),
|
redirect_uri: this.getRedirectUri(),
|
||||||
state,
|
state,
|
||||||
nonce,
|
nonce,
|
||||||
|
|
|
@ -566,6 +566,9 @@ export default {
|
||||||
"admin.config.oauth.oidc-sign-out": "Sign out from OpenID Connect",
|
"admin.config.oauth.oidc-sign-out": "Sign out from OpenID Connect",
|
||||||
"admin.config.oauth.oidc-sign-out.description":
|
"admin.config.oauth.oidc-sign-out.description":
|
||||||
"Whether the “Sign out” button will sign out from the OpenID Connect provider",
|
"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": "OpenID Connect username claim",
|
||||||
"admin.config.oauth.oidc-username-claim.description":
|
"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.",
|
"Username claim in OpenID Connect ID token. Leave it blank if you don't know what this config is.",
|
||||||
|
|
Loading…
Add table
Reference in a new issue