Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Fixing JSON response for verifying password reset tokens #388

Merged
merged 3 commits into from
Mar 17, 2016

Conversation

robertjd
Copy link
Member

In the failure case, we need to render a JSON error message (not redirect to the login page). Fixes #385

To verify:

With the fix, you should see the error message: "This password reset link is not valid. You may request another link by clicking here." (Expected behaviour)

Without the fix, you should see the change password (problem behaviour).

I've added a new test for HTML vs JSON on this endpoint, and refeactored this test file to use a single default express application (where possible)..

In the failure case, we need to render a JSON error message (not redirect to the login page)
@typerandom
Copy link
Contributor

This works as advertised! :) Though I cleaned it up a little bit and changed so that the method only accepts GET and POST requests.

@robertjd
Copy link
Member Author

Thanks @typerandom !

robertjd added a commit that referenced this pull request Mar 17, 2016
Fixing JSON response for verifying password reset tokens
@robertjd robertjd merged commit 488846a into master Mar 17, 2016
@robertjd robertjd deleted the sptoken-json-fix branch March 17, 2016 16:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sptoken in password reset link not validated
2 participants