@@ -8,7 +8,7 @@ import config from "./config.js";
88
99
1010function checkOpenIDConfig ( ) {
11- let missingVars : string [ ] = [ ]
11+ const missingVars : string [ ] = [ ]
1212 if ( config . MultiFactorAuthentication . oauthBaseUrl === "" ) {
1313 missingVars . push ( "oauthBaseUrl" ) ;
1414 }
@@ -89,6 +89,14 @@ function isTokenValid(req: Request, res: Response, next: NextFunction) {
8989 }
9090}
9191
92+ function getSSOIssuerName ( ) {
93+ return config . MultiFactorAuthentication . oauthIssuerName ;
94+ }
95+
96+ function getSSOIssuerIcon ( ) {
97+ return config . MultiFactorAuthentication . oauthIssuerIcon ;
98+ }
99+
92100function generateOAuthConfig ( ) {
93101 const authRoutes = {
94102 callback : "/callback" ,
@@ -105,7 +113,7 @@ function generateOAuthConfig() {
105113 auth0Logout : false ,
106114 baseURL : config . MultiFactorAuthentication . oauthBaseUrl ,
107115 clientID : config . MultiFactorAuthentication . oauthClientId ,
108- issuerBaseURL : "https://accounts.google.com" ,
116+ issuerBaseURL : config . MultiFactorAuthentication . oauthIssuerBaseUrl ,
109117 secret : config . MultiFactorAuthentication . oauthClientSecret ,
110118 clientSecret : config . MultiFactorAuthentication . oauthClientSecret ,
111119 authorizationParams : {
@@ -147,6 +155,8 @@ function generateOAuthConfig() {
147155export default {
148156 generateOAuthConfig,
149157 getOAuthStatus,
158+ getSSOIssuerName,
159+ getSSOIssuerIcon,
150160 isOpenIDEnabled,
151161 clearSavedUser,
152162 isTokenValid,
0 commit comments