chore: auth gaps docs
This commit is contained in:
@@ -8,6 +8,18 @@ This file tracks known gaps and risks to address in future iterations.
|
||||
- Authentica OTP provider is implemented (SMS + WhatsApp via Authentica OTP).
|
||||
- Social login is a placeholder.
|
||||
- `USERNAME_FIELD` is now `"phone_number"`; `REQUIRED_FIELDS = []`; `create_superuser` accepts `phone_number`. Admin and `createsuperuser` work correctly for phone-only users.
|
||||
- API currently exposes mixed auth paths (`/accounts/register/`, `/accounts/token/`, and phone OTP login), creating unclear source-of-truth for identity/auth policy.
|
||||
- OTP purpose isolation is enforced at verification endpoint boundaries (`/otp/verify` accepts only `verify`, `/phone/verify` accepts only `auth`).
|
||||
- Django admin user configuration remains email-centric (ordering/add form defaults), increasing operational friction for phone-only accounts.
|
||||
- Multiple serializers/model `__str__` paths in non-auth apps still fallback to `user.email`; phone-only users may get poor display/audit clarity.
|
||||
|
||||
## Next Auth Review Points
|
||||
- Enforce normalized E.164 phone format at model/DB boundary (constraints, indexing, uniqueness behavior with nullable fields).
|
||||
- Add DB-level non-null + format guardrails for `accounts_user.phone_number` to complement service-level normalization.
|
||||
- Decide user lifecycle for phone auth (create user before OTP verify vs provisional/pre-user state).
|
||||
- Expand abuse prevention beyond per-phone cooldown (IP throttling, device fingerprint, risk signals).
|
||||
- Define OAuth account-linking policy (phone/email conflicts, merge rules, trust source).
|
||||
- Add explicit tests for phone-first invariants (null-phone rejection if required, token endpoint behavior, OTP purpose isolation, verified-phone guards).
|
||||
|
||||
## Booking Integrity
|
||||
- Availability checks and overlap prevention are now enforced for staff bookings.
|
||||
|
||||
Reference in New Issue
Block a user