view-forgot-password.js 569 B

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = {
  2. friendlyName: 'View forgot password',
  3. description: 'Display "Forgot password" page.',
  4. exits: {
  5. success: {
  6. viewTemplatePath: 'pages/entrance/forgot-password',
  7. },
  8. redirect: {
  9. description: 'The requesting user is already logged in.',
  10. extendedDescription: 'Logged-in users should change their password in "Account settings."',
  11. responseType: 'redirect',
  12. }
  13. },
  14. fn: async function (inputs, exits) {
  15. if (this.req.me) {
  16. throw {redirect: '/'};
  17. }
  18. return exits.success();
  19. }
  20. };