Implement (optional) SSO via OIDC (OpenID Connect) (#64)
This implements optional SSO via OIDC for logging in and signing up (for the first admin sign up or if sign up is allowed). The most requested feature! Tested with Authentik and Google! It includes a new `SimpleCache` interface (in-memory, using [`caches`](https://developer.mozilla.org/en-US/docs/Web/API/Window/caches)) for storing the state and code challenges. Closes #13
This commit is contained in:
@@ -14,6 +14,10 @@ export class AppConfig {
|
||||
enableMultiFactor: false,
|
||||
allowedCookieDomains: [],
|
||||
skipCookieDomainSecurity: false,
|
||||
enableSingleSignOn: false,
|
||||
singleSignOnUrl: '',
|
||||
singleSignOnEmailAttribute: 'email',
|
||||
singleSignOnScopes: ['openid', 'email'],
|
||||
},
|
||||
files: {
|
||||
rootPath: 'data-files',
|
||||
@@ -200,6 +204,12 @@ export class AppConfig {
|
||||
return this.config.auth.enableMultiFactor;
|
||||
}
|
||||
|
||||
static async isSingleSignOnEnabled(): Promise<boolean> {
|
||||
await this.loadConfig();
|
||||
|
||||
return this.config.auth.enableSingleSignOn;
|
||||
}
|
||||
|
||||
static async getFilesRootPath(): Promise<string> {
|
||||
await this.loadConfig();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user