Verify email by code
GET /users/email/verification
GET
/users/email/verification
Will verify the email by the code sent in query param, and redirect to success or failed page
Flow:
- Validate request.
- code is required. this is coming from the email verification link query param.
- Validate the code is a valid jwt token. - Decode the jwt token and get the email and userId from the claims.
- Validate the email and userId are present in the claims.
- Validate the email is a valid email.
- Check if the email is already used by another user and is verified. If yes, return 400 email already registered.
- Update the user email and email status to verified.
- Publish the AUTH_USER_UPDATED event.
- Redirect to email verification success page.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” code
string
Jwt token containing email and user id
Responses
Section titled “ Responses ”Found