Skip to main content

Module email_verification

Module email_verification 

Source
Expand description

Handlers for HTTP requests to /api/v0/main-frontend/email-verification.

Proving that an account can read the address it claims: user_details.email is self-service editable, and the OIDC discovery document advertises an email_verified claim.

Structs§

EmailVerificationEmailInfo
What we last mailed about the address the account holds now. Never a delivery confirmation: we hand messages to an SMTP relay and cannot see an inbox.
EmailVerificationStatus
MainFrontendEmailVerificationApiDoc ðŸ”’
RequestEmailVerificationPayload
VerifyEmailOwnershipPayload

Enums§

RequestEmailVerificationOutcome
VerifyEmailOwnershipResult
Outcome of submitting a code. Wrong, expired, superseded and spent are one value: they are indistinguishable to someone typing digits, and telling them apart only helps a guesser.

Constants§

PURPOSE ðŸ”’

Functions§

_add_routes
get_email_verification_code_for_test_mode
GET /api/v0/main-frontend/email-verification/test-mode-code - The signed-in account’s own pending verification code.
get_my_email_verification_status
GET /api/v0/main-frontend/email-verification/status - Whether the signed-in account’s address is proven, and what we last mailed about it.
request_email_verification_code
POST /api/v0/main-frontend/email-verification/request - Mails a fresh verification code to the signed-in account’s current address.
verify_email_ownership
POST /api/v0/main-frontend/email-verification/verify - Spends a mailed code and records the proof.