Skip to content

Phase 3 — Auth Flows

Pre-release
Pre-release

Choose a tag to compare

@timihack timihack released this 11 Jun 14:29

What's included

Auth Flows

9 complete flows: register, verify email (link + OTP), resend verification,
login, logout, refresh, forgot password (link + OTP), reset password (link + OTP),
change password.

SMS Support

Three built-in SMS backends: Twilio, AWS SNS, and Console (dev).
Drop in any custom backend by implementing AbstractSmsBackend.

Flexible Verification

Switch between link-based and OTP-based verification via config.
OTP delivered via email, SMS, or both simultaneously.

Multi-Identifier Login

Users can log in with email, username, or phone number.
Configure the order fields are tried via login_identifier_fields.

NotificationService

Single hub that routes all notifications across channels.
Fully replaceable via AbstractNotificationService protocol.

Flexible User Model

UserInDB supports extra_data dict, extra="allow" for subclassing,
and new phone + OTP fields built in.

Test Coverage

71 tests — 71 passing
Cumulative: 183 tests passing across Phases 1–3

Install

pip install authwarden

With SMS support via Twilio or Mailgun/SendGrid:

pip install httpx

With AWS SNS:

pip install boto3