diff --git a/client/js/controllers/auth_controller.js b/client/js/controllers/auth_controller.js index b1a52b2..f470e22 100644 --- a/client/js/controllers/auth_controller.js +++ b/client/js/controllers/auth_controller.js @@ -68,9 +68,10 @@ class AuthController { _passwordResetFinishRoute(name, token) { api.forget(); api.logout(); + let password = null; api.post('/password-reset/' + name, {token: token}) .then(response => { - const password = response.password; + password = response.password; return api.login(name, password, false); }, response => { return Promise.reject(response.description);