Skip to content

Commit

Permalink
N21-1273 fixed login redirect for ldap and local
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed Oct 11, 2023
1 parent 7ecbaf7 commit 612e10b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ router.post('/login/email', async (req, res) => {
password,
};

await authHelper.loginUser(req, res, 'local', payload, redirect, 'Email');
const result = await authHelper.loginUser(req, res, 'local', payload, redirect, 'Email');

res.redirect(result.redirect);
});

router.get('/login/email', (req, res) => {
Expand Down Expand Up @@ -146,7 +148,9 @@ router.post('/login/ldap', async (req, res) => {
schoolId,
};

await authHelper.loginUser(req, res, 'ldap', payload, redirect, 'LDAP');
const result = await authHelper.loginUser(req, res, 'ldap', payload, redirect, 'LDAP');

res.redirect(result.redirect);
});

router.get('/login/ldap', (req, res) => {
Expand Down

0 comments on commit 612e10b

Please sign in to comment.