Expand description
Email Verification API Endpoints
Handles email address verification through token-based confirmation.
§Storage keys
email_verify:{token}— user_id bytes, TTL 24 hours (verification link)- User JSON
email_verifiedfield —trueonce verified
§Flow
- User registers →
email_verifiedset tofalsein user record POST /auth/verify-email/send→ generates a verification token and hands it to the configuredEmailVerificationSenderPOST /auth/verify-email→ verifies token, setsemail_verified: truePOST /auth/resend-verification→ same as 2 for a not-yet-logged-in user
The token proves control of the mailbox, so it is delivered ONLY through the sender
(see ApiState::with_email_verification_sender) and is never part of a response.
Without a sender nothing can be delivered and verification cannot complete.
Structs§
- Resend
Verification Request - Request body for
POST /auth/resend-verification. - Verification
Sent Response - Response to a request to send a verification message. It never contains the token.
- Verify
Email Request - Request body for
POST /auth/verify-email.
Traits§
- Email
Verification Sender - Delivers a verification token to the mailbox it proves ownership of.
Functions§
- resend_
verification POST /auth/resend-verification- send_
verification POST /auth/verify-email/send- verify_
email POST /auth/verify-email