Before doing this task, be sure to update vergepos-api-gateway, db migrate, and php artisan db:seed --class=ServiceRestore
Description
File Location: @/views/PasswordReset.vue
Link: /password-reset or click the forgot password in the log in page
The page has two phase, the Request Change Password and Confirm Change Password.
Request Change Password is where the user send a request to change the password by providing the email address of the account. The confirmation code will be sent through the email.
The Confirm Change Password, is where the user will enter the email(if not yet provided), confirmation code, and the new password.
Request Change Password
API for requesting: /user/request-change-password
When the user click the "Send Request" button, it will send a request using the API above. If successful, hide the Request Change Password Form and show the Confirm Change Password Form with prefilled up email.
Dont forget check for different errors in API.
Also provide the user an option to view the Confirm Change Password Form without having to send a request. This is for those who already made the request and has the code.
Confirm Change Password
API for confirming: confirm-change-password
There are two ways to get Confirm Change Password Form:
Redirected after sending the request
Clicking the "I have already a confirmation code" in the Request Form
Clicking the link in the email. In this case, email and confirmation code should already been filled up using link parameters.
The API requires three parameters: email, confirmation code, and new password. If sucess, the data will be true.
There are at least 6 possible errors that can with the API. It should be dealt accordingly. These are:
Validation Error
Email and Confirmation Code Mismatched
Confirmation Code has already expired
The confirmation code has been invalidated. Usually happens if the user who receive the email clicked the "Its not me!" link in the email.
The confirmation code has already been used to change the password
System error. This should not happened not unless there is a problem in the system.
In detecting the error, compare using error code rather than the error message.
For error 3 and 4, the "Change Password" button should be hidden and "Send New Change Password Request" is shown.
For error code 5: The Change Password will be replaced with "Go to Log In Page" and "Send New Change Password Request" respectively.
For error code 6: hide the form, and show a message to contact the admin through facebook page about the error
Reminder
Before doing this task, be sure to update vergepos-api-gateway, db migrate, and
php artisan db:seed --class=ServiceRestore
Description
File Location: @/views/PasswordReset.vue Link: /password-reset or click the forgot password in the log in page
The page has two phase, the Request Change Password and Confirm Change Password.
Request Change Password is where the user send a request to change the password by providing the email address of the account. The confirmation code will be sent through the email.
The Confirm Change Password, is where the user will enter the email(if not yet provided), confirmation code, and the new password.
Request Change Password
API for requesting: /user/request-change-password
When the user click the "Send Request" button, it will send a request using the API above. If successful, hide the Request Change Password Form and show the Confirm Change Password Form with prefilled up email.
Dont forget check for different errors in API.
Also provide the user an option to view the Confirm Change Password Form without having to send a request. This is for those who already made the request and has the code.
Confirm Change Password
API for confirming: confirm-change-password
There are two ways to get Confirm Change Password Form:
The API requires three parameters: email, confirmation code, and new password. If sucess, the data will be true.
There are at least 6 possible errors that can with the API. It should be dealt accordingly. These are:
In detecting the error, compare using error code rather than the error message.
For error 3 and 4, the "Change Password" button should be hidden and "Send New Change Password Request" is shown.
For error code 5: The Change Password will be replaced with "Go to Log In Page" and "Send New Change Password Request" respectively.
For error code 6: hide the form, and show a message to contact the admin through facebook page about the error