Skip to content

Commit d53494a

Browse files
jescaladakriswest
andauthored
Update src/service/routes/auth.js
Co-authored-by: Kris West <kristopher.west@natwest.com> Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
1 parent 590449b commit d53494a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/service/routes/auth.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ const loginSuccessHandler = () => async (req, res) => {
6767
};
6868

6969
router.get('/config', (req, res) => {
70+
const usernamePasswordMethod = getLoginStrategy();
7071
res.send({
71-
allLoginMethods: getAuthMethods().map((am) => am.type.toLowerCase()),
72-
usernamePasswordMethod: getLoginStrategy(),
72+
// enabled username /password auth method
73+
usernamePasswordMethod: usernamePasswordMethod,
74+
// other enabled auth methods
75+
otherMethods: getAuthMethods().map((am) => am.type.toLowerCase()).filter((authType) => authType !== usernamePasswordMethod),
7376
});
7477
});
7578

0 commit comments

Comments
 (0)