Verify Email
Verifies a user’s email address using a verification token. This endpoint is typically called after the user clicks the verification link in their email.Authentication
No authentication required (token is provided in request body).Request Body
The verification token hash from the email verification link
The type of verification. Defaults to “email” if not provided.
Response
Success message confirming email verification
Supabase authentication session created after verification
Error Responses
Error message
400- Bad request (e.g., invalid or expired token)500- Internal server error
Example Request
Example Response
Usage Notes
- The verification link in the email redirects to your frontend with a token hash parameter
- Your frontend extracts the
token_hashfrom the URL and calls this endpoint - Upon successful verification, the user’s
emailVerifiedfield is set totruein MongoDB - A session is automatically created, allowing the user to proceed without logging in again
- Verification tokens expire after a set time period
Resend Verification Email
Resends the email verification link to a user’s email address.Authentication
No authentication required.Request Body
Email address to send the verification link to
Response
Success message confirming the email was sent
Error Responses
Error message
400- Bad request (e.g., email already verified, invalid email, email not found)500- Internal server error
Example Request
Example Response
Usage Notes
- This endpoint can be used when users don’t receive the initial verification email
- The verification link redirects to the frontend URL configured in
FRONTEND_URLenvironment variable - Rate limiting may be applied to prevent abuse
- Users should check their spam folder if they don’t receive the email
- The new verification link invalidates any previously sent verification links