overleaf/services/web/app/coffee/Features/PasswordReset/PasswordResetRouter.coffee
Jessica Lawshe f455a11aa8 Merge pull request #1655 from sharelatex/jel-user-must-reconfirm
Reconfirm user accounts

GitOrigin-RevId: 0343ff745e881cd51b5efbfb97404b6b926905c8
2019-04-17 14:14:19 +00:00

15 lines
No EOL
760 B
CoffeeScript

PasswordResetController = require("./PasswordResetController")
AuthenticationController = require('../Authentication/AuthenticationController')
module.exports =
apply: (webRouter, apiRouter) ->
webRouter.get '/user/password/reset', PasswordResetController.renderRequestResetForm
webRouter.post '/user/password/reset', PasswordResetController.requestReset
AuthenticationController.addEndpointToLoginWhitelist '/user/password/reset'
webRouter.get '/user/password/set', PasswordResetController.renderSetPasswordForm
webRouter.post '/user/password/set', PasswordResetController.setNewUserPassword
AuthenticationController.addEndpointToLoginWhitelist '/user/password/set'
webRouter.post '/user/reconfirm', PasswordResetController.requestReset