43 lines
1011 B
Markdown
43 lines
1011 B
Markdown
# AccuPedia Auth Feature
|
|
|
|
Bounded-context authentication/identity package for the four-schema database.
|
|
|
|
## Routes
|
|
|
|
- `POST /auth/register`
|
|
- `POST /auth/login`
|
|
- `GET /auth/me`
|
|
- `GET /auth/profile`
|
|
- `PUT /auth/profile`
|
|
- `POST /auth/change-password`
|
|
- `POST /auth/forgot-password`
|
|
- `POST /auth/reset-password`
|
|
|
|
`GET /auth/me` and `GET /auth/profile` return identity + roles only.
|
|
|
|
Subscription, entitlement and unlocked-module state are intentionally excluded.
|
|
Use `GET /access/me` for access state.
|
|
|
|
## Persistence ownership
|
|
|
|
This package uses only auth-owned models:
|
|
|
|
- `auth.app_users`
|
|
- `auth.roles`
|
|
- `auth.user_roles`
|
|
- `auth.password_reset_otps`
|
|
|
|
No content/commerce query is performed by the auth repository.
|
|
|
|
## Passwords
|
|
|
|
bcrypt only. No SHA/PBKDF2 backward compatibility.
|
|
|
|
## OTP
|
|
|
|
- cryptographically generated 6-digit code
|
|
- 15 minute validity
|
|
- previous unused OTPs invalidated
|
|
- account-enumeration-safe forgot-password response
|
|
- email adapter: `app.services.email.send_password_reset_email`
|