diff --git a/api/script/routes/passport-authentication.ts b/api/script/routes/passport-authentication.ts index 488d0d75a..46bb8f28a 100644 --- a/api/script/routes/passport-authentication.ts +++ b/api/script/routes/passport-authentication.ts @@ -167,17 +167,17 @@ export class PassportAuthentication { router.get("/auth/login", this._cookieSessionMiddleware, (req: Request, res: Response): any => { req.session["hostname"] = req.query.hostname; - res.render("authenticate", { action: "login" }); + res.render("authenticate", { action: "login", isGitHubAuthenticationEnabled, isMicrosoftAuthenticationEnabled }); }); router.get("/auth/link", this._cookieSessionMiddleware, (req: Request, res: Response): any => { req.session["authorization"] = req.query.access_token; - res.render("authenticate", { action: "link" }); + res.render("authenticate", { action: "link", isGitHubAuthenticationEnabled, isMicrosoftAuthenticationEnabled }); }); router.get("/auth/register", this._cookieSessionMiddleware, (req: Request, res: Response): any => { req.session["hostname"] = req.query.hostname; - res.render("authenticate", { action: "register" }); + res.render("authenticate", { action: "register", isGitHubAuthenticationEnabled, isMicrosoftAuthenticationEnabled }); }); return router; diff --git a/api/script/views/authenticate.ejs b/api/script/views/authenticate.ejs index cb6218986..33251b46f 100644 --- a/api/script/views/authenticate.ejs +++ b/api/script/views/authenticate.ejs @@ -85,11 +85,15 @@
GitHub
-
-
Microsoft (Personal)
-
-
Microsoft (Work)
GitHub
+
+ <% } %>
+ <% if (isMicrosoftAuthenticationEnabled) { %>
+
Microsoft (Personal)
+
+
Microsoft (Work)