-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
I haven't been able to get the Forgot Password flow working yet.
Reset token generation works. I wired up an email service that links to the reset URL: auth/reset-password?reset_password_token=TokenGoesHere.
The link takes the user to the Change password page. They enter a new password and click CHANGE PASSWORD.
Expectation: This posts the password to the restore-pass API endpoint in the demo .NET API. Actually, it posts it to reset-pass, which expects the user to be logged in.
I changed the config to point to /auth/restore-pass:
resetPass: {
endpoint: '/auth/restore-pass',
method: 'post',
},
Now the endpoint is hit. However, Nebular doesn't populate the RestorePasswordDTO's Email property, so password reset fails.
Steps To Reproduce
- Clone the repo.
- Follow the instructions in the .NET and Angular READMEs.
- Run the .NET API.
- Run the Angular app.
- When prompted to log in, click Register.
- Open Chrome DevTools.
- Fill out and submit the form.
- Navigate to the Network tab in DevTools and find the
request-passrequest. - Click the Preview tab and copy the value of the response's
dataproperty. - Navigate to http://localhost:4200/auth/reset-password?reset_password_token=TokenGoesHere
- Fill out and submit the form.
Expected Behavior
The user's password is successfully reset.
Actual Behavior
- If
reset-password's URL points toreset-passwordin the API, the API returns an auth error (HTTP 401) because the user isn't authenticated, since this is an anonymous "forgot password" request. - If the URL points to
restore-password, password reset fails because theEmailproperty ofRestorePasswordDTOisn't populated.
Metadata
Metadata
Assignees
Labels
No labels