We need to update the frontend code to accommodate the backend changes where the verification process now uses a unique token instead of an email address. This will ensure that the frontend aligns with the backend's improved security and consistency measures.
Changes Required:
VerificationForm.tsx:
Modify the useEffect hook to retrieve the token parameter from the URL instead of email.
Update the checkVerificationStatus function to accept a token instead of email.
Update the API call to use the token as a query parameter instead of email.
Handle the response to include the email field and update the state accordingly.
Acceptance Criteria:
The verification process on the frontend uses the token from the URL for verification.
The checkVerificationStatus function correctly calls the updated backend endpoint using the token.
The frontend displays the appropriate success message based on the verification status.
The email associated with the verification is correctly retrieved and handled in the component's state.
All affected components and logic are tested and working correctly.
Additional Notes
This issue is related to backend modifications described in #69 (Use token instead of email for verifying account and checking verification status).
This update will ensure that the frontend properly interacts with the backend's new token-based verification process, maintaining the application's security and functionality.
We need to update the frontend code to accommodate the backend changes where the verification process now uses a unique token instead of an email address. This will ensure that the frontend aligns with the backend's improved security and consistency measures.
Changes Required:
useEffect
hook to retrieve thetoken
parameter from the URL instead ofemail
.checkVerificationStatus
function to accept atoken
instead ofemail
.token
as a query parameter instead ofemail
.email
field and update the state accordingly.Acceptance Criteria:
token
from the URL for verification.checkVerificationStatus
function correctly calls the updated backend endpoint using thetoken
.Additional Notes
This update will ensure that the frontend properly interacts with the backend's new token-based verification process, maintaining the application's security and functionality.