docs: record auth hash alignment and validation results
This commit is contained in:
1 parent
22887fef03
commit
f7819904b9
51 files changed
+1792
-542
No files matched your search
@@ -82,13 +82,17 @@ These are the complete Svelte component exports from `packages/web-ui/src/lib/in
|
||||
| Component | Includes |
|
||||
|---|---|
|
||||
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
|
||||
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
|
||||
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. Changing a password asks for the current password and, when TOTP is enabled, a current authenticator code; `onSave` receives both proofs in `ProfileUpdateInput`. |
|
||||
| `TotpSettings` | TOTP status, setup, enable, and disable controls. |
|
||||
|
||||
This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update the matching category table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the tables aligned with that barrel file, place each component in the category that matches its primary purpose, and do not add internal or generated components to them.
|
||||
|
||||
The `web-ui` components don't import `$app/state`, `$lib` stores, or a project-specific API — applications provide those through props and callbacks.
|
||||
|
||||
### AuthGuard session validation
|
||||
|
||||
The Go and Python `AuthClient.validate()` helpers cache both valid and invalid session results for two seconds. If a session is revoked directly in AuthGuard, a service using that cache may accept it for up to two more seconds. Calling logout through the same client clears its cached result immediately.
|
||||
|
||||
---
|
||||
|
||||
## How consumers actually use this
|
||||
@@ -134,7 +138,7 @@ go vet ./...
|
||||
|
||||
Go tests that need PostgreSQL skip themselves unless a scratch database is named: `DATABASE_URL` for the auth store tests, `SHARED_TEST_DATABASE_URL` for the platform-user, mediacore and migrate tests. They create tables and delete rows, so never point either at a real database. CI runs them against a throwaway PostgreSQL service (`go test -p 1 ./...`).
|
||||
|
||||
`contract/auth-contract.json` holds fixtures (password hashes, TOTP codes, client addresses) that the Go, Node and Python test suites all load, so the runtimes cannot drift apart unnoticed.
|
||||
`contract/auth-contract.json` holds fixtures (password hashes, TOTP codes, client addresses, and the internal-secret rule: minimum length and example placeholders) that the Go, Node and Python test suites all load, so the runtimes cannot drift apart unnoticed.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user