Email Verification
Send verification email
POST /api/auth/send-verification-email
Cookie: nexfetch_auth.session_token=...
The user receives an email with a verification token.
Verify
POST /api/auth/verify-email
{"token": "the-token-from-email"}
After verification, user.emailVerified becomes true.
Email providers
from nexfetch_auth.core.email import ConsoleEmailProvider, SmtpEmailProvider, CallbackEmailProvider
# Console (default, dev only)
provider = ConsoleEmailProvider()
# SMTP
provider = SmtpEmailProvider(
host="smtp.gmail.com", port=587,
username="...", password="...",
from_email="noreply@app.com",
)
# Custom (SendGrid, Resend, etc.)
async def send(to, subject, body):
...
provider = CallbackEmailProvider(callback=send)