Skip to content

Commit 869c20c

Browse files
committed
0.5.0
1 parent ae38182 commit 869c20c

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

docs/changelog.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ breaking changes; those are called out explicitly.
55

66
___
77

8+
## 0.5.0 - 2026-06-21
9+
10+
Account & device management. The session/device endpoints apps kept hand-writing are now opt-in
11+
built-in routes, plus an in-session password change. Everything is additive.
12+
13+
#### Added
14+
- **Session & CSRF management routes** (`SessionTransport(management_routes=True)`, off by default):
15+
`GET /sessions` (device list), `DELETE /sessions/{id}` (revoke one, ownership-checked, `404` if not
16+
found or not yours), `POST /logout-all` (with `?keep_current=true`), and `POST /csrf/refresh`
17+
(re-mint a lost CSRF cookie; self-heals; the deliberate non-`current_user` recovery path). Thin
18+
handlers over the existing `SessionManager`; the three mutating ones enforce CSRF via the session
19+
transport.
20+
- **`POST /change-password`** (always mounted): change a known password while signed in. The current
21+
password is the re-authentication; a successful change bumps `token_version` and revokes the user's
22+
*other* sessions (keeping the current one), and fires `on_after_password_changed`. `401` on a wrong
23+
current password, `400` on an OAuth-only account (use `/set-password`).
24+
- **`on_after_password_changed`** hook, distinct from `on_after_password_reset` (the token flow).
25+
- **`SessionInfo`** is now exported (the `GET /sessions` response model), and a flat **Endpoints**
26+
API-reference page maps every mountable route in one place.
27+
- `SessionManager.set_csrf_cookie(...)` (the CSRF half of `set_session_cookies`, reusable on its own).
28+
29+
___
30+
831
## 0.4.0 - 2026-06-21
932

1033
Custom email bodies. `EmailSender.send` now receives an `EmailContext`, so you render your own

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "crudauth"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "Batteries-included, transport-agnostic authentication for FastAPI."
55
readme = "README.md"
66
license = "MIT"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)