diff --git a/apps/server/src/assets/config-sample.ini b/apps/server/src/assets/config-sample.ini index f89790163..41eb3d2b6 100644 --- a/apps/server/src/assets/config-sample.ini +++ b/apps/server/src/assets/config-sample.ini @@ -55,3 +55,15 @@ oauthClientId= # Set the client secret for OAuth/OpenID authentication # This is the secret of the client that will be used to verify the user's identity oauthClientSecret= + +# Set the issuer base URL for OAuth/OpenID authentication +# This is the base URL of the service that will be used to verify the user's identity +oauthIssuerBaseUrl= + +# Set the issuer name for OAuth/OpenID authentication +# This is the name of the service that will be used to verify the user's identity +oauthIssuerName= + +# Set the issuer icon for OAuth/OpenID authentication +# This is the icon of the service that will be used to verify the user's identity +oauthIssuerIcon= diff --git a/apps/server/src/services/config.ts b/apps/server/src/services/config.ts index 2089c03ce..d88236b52 100644 --- a/apps/server/src/services/config.ts +++ b/apps/server/src/services/config.ts @@ -46,6 +46,9 @@ export interface TriliumConfig { oauthBaseUrl: string; oauthClientId: string; oauthClientSecret: string; + oauthIssuerBaseUrl: string; + oauthIssuerName: string; + oauthIssuerIcon: string; }; } @@ -123,7 +126,16 @@ const config: TriliumConfig = { process.env.TRILIUM_OAUTH_CLIENT_ID || iniConfig?.MultiFactorAuthentication?.oauthClientId || "", oauthClientSecret: - process.env.TRILIUM_OAUTH_CLIENT_SECRET || iniConfig?.MultiFactorAuthentication?.oauthClientSecret || "" + process.env.TRILIUM_OAUTH_CLIENT_SECRET || iniConfig?.MultiFactorAuthentication?.oauthClientSecret || "", + + oauthIssuerBaseUrl: + process.env.TRILIUM_OAUTH_ISSUER_BASE_URL || iniConfig?.MultiFactorAuthentication?.oauthIssuerBaseUrl || "https://accounts.google.com", + + oauthIssuerName: + process.env.TRILIUM_OAUTH_ISSUER_NAME || iniConfig?.MultiFactorAuthentication?.oauthIssuerName || "Google", + + oauthIssuerIcon: + process.env.TRILIUM_OAUTH_ISSUER_ICON || iniConfig?.MultiFactorAuthentication?.oauthIssuerIcon || "" } };