Skip to content

Commit

Permalink
moving set pass controller to be under /api
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Motlagh committed Oct 4, 2023
1 parent 4569626 commit 9c1182a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/accounts/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const screens = {
redirect: query.redirect ||
authGroup.primaryDomain ||
`https://${(aliasUi) ? aliasUi : config.UI_URL}/${authGroup.prettyName}` || undefined,
url: `${config.PROTOCOL}://${(aliasDns) ? aliasDns : config.SWAGGER}/${authGroup._id}/setpass`,
url: `${config.PROTOCOL}://${(aliasDns) ? aliasDns : config.SWAGGER}/api/${authGroup._id}/setpass`,
retryUrl: `${config.PROTOCOL}://${(aliasDns) ? aliasDns : config.SWAGGER}/api/${authGroup._id}/operations/reset-user-password`,
...screens.baseSettings(authGroup)
};
Expand Down
3 changes: 3 additions & 0 deletions src/routes/accService.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ router.get('/account/groups/recovery', [
], account.recoveryGroups);

// Form POST for setting new password
// todo - remove if not needed here, moving this to the API section...
/*
router.post('/:group/setpass', [
jsonParser,
m.setNoCache,
m.validateAuthGroup,
m.isAuthenticatedOrIAT
], account.forgot);
*/

router.get('/:group/forgotpassword', [
jsonParser,
Expand Down
5 changes: 5 additions & 0 deletions src/routes/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,10 @@ router.get('/:group/account/login/options', [
m.validateAuthGroup,
m.getGlobalPluginSettings
], account.getAccountLogins);
router.post('/:group/setpass', [
m.setNoCache,
m.validateAuthGroup,
m.isAuthenticatedOrIAT
], account.forgot);

export default router;

0 comments on commit 9c1182a

Please sign in to comment.