diff --git a/spec/ValidationAndPasswordsReset.spec.js b/spec/ValidationAndPasswordsReset.spec.js index 62ed514e..04dad59d 100644 --- a/spec/ValidationAndPasswordsReset.spec.js +++ b/spec/ValidationAndPasswordsReset.spec.js @@ -816,7 +816,7 @@ describe("Custom Pages, Email Verification, Password Reset", () => { return; } expect(response.statusCode).toEqual(302); - expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html'); + expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html?username=zxcv'); Parse.User.logIn("zxcv", "hello").then(function(user){ let config = new Config('test'); diff --git a/src/Routers/PublicAPIRouter.js b/src/Routers/PublicAPIRouter.js index 31e11035..efad9087 100644 --- a/src/Routers/PublicAPIRouter.js +++ b/src/Routers/PublicAPIRouter.js @@ -102,9 +102,10 @@ export class PublicAPIRouter extends PromiseRouter { } return config.userController.updatePassword(username, token, new_password).then((result) => { + let params = qs.stringify({username: username}); return Promise.resolve({ status: 302, - location: config.passwordResetSuccessURL + location: `${config.passwordResetSuccessURL}?${params}` }); }, (err) => { let params = qs.stringify({username: username, token: token, id: config.applicationId, error:err, app:config.appName})