Link Expired:
The user requests to resend the verification link before the original 60-minute window expires. The first link becomes deactivated, and only the newly sent link will be valid for use. This state is activated if the user clicks on an old verification link after a new one has been sent. Upon clicking the outdated link, the user will receive an error message indicating that the link is no longer valid. The user will have the options to either check their inbox for the latest email to complete the verification process or click on "Back to Sign Up" to restart the sign-up process. => we get Link Expired layout
Link Invalid:
in this state, if the user fails to click the verification link within the 60-minute window and the email has been removed from the database, verifying the account is unsuccessful. The user will be prompted to sign up again from the beginning, as the original verification process cannot be completed. => we get Something went wrong layout
Notes
Check with frontend branch feat/137/new-account-verification-design
Test Steps
To test set JWT_EMAIL_LIFETIME=5m, restart the terminal, register and within 5 min resend the verification link to email (with the resend link). The previous link should be expired. After 5 min the latest link should be invalid (smth went wrong message).
Change JWT_EMAIL_LIFETIME to 1 hour back :)))
Database Changes (if there are any)
VerificationToken model
Checklist
[x] Pull Request title includes the issue number and a brief description of the change.
[x] All changes should be tested and verified to work correctly.
[x] Code follows backend best practices.
[x] Branch names follow the conventions in the contributing file.
[x] Commit messages follow the naming conventions in the contributing file.
[x] No sensitive data or secrets are included in the codebase.
Correct account verification flow
Requirements
Link Expired: The user requests to resend the verification link before the original 60-minute window expires. The first link becomes deactivated, and only the newly sent link will be valid for use. This state is activated if the user clicks on an old verification link after a new one has been sent. Upon clicking the outdated link, the user will receive an error message indicating that the link is no longer valid. The user will have the options to either check their inbox for the latest email to complete the verification process or click on "Back to Sign Up" to restart the sign-up process. => we get Link Expired layout
Link Invalid: in this state, if the user fails to click the verification link within the 60-minute window and the email has been removed from the database, verifying the account is unsuccessful. The user will be prompted to sign up again from the beginning, as the original verification process cannot be completed. => we get Something went wrong layout
Notes
Check with frontend branch feat/137/new-account-verification-design
Test Steps
To test set JWT_EMAIL_LIFETIME=5m, restart the terminal, register and within 5 min resend the verification link to email (with the resend link). The previous link should be expired. After 5 min the latest link should be invalid (smth went wrong message).
Change JWT_EMAIL_LIFETIME to 1 hour back :)))
Database Changes (if there are any)
Checklist