@palbase/backend 14.1.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/auth.md CHANGED
@@ -45,6 +45,8 @@ admin users API); `role` is the **database** role RLS reads and is always
45
45
  `emailVerified` is likewise read from the verified profile rather than a JWT
46
46
  claim: a claim is only true as of when the token was minted, so a user who
47
47
  verifies mid-session would keep reporting `false` until their token expired.
48
+ Profile reads are cached for ~30 seconds, so a change shows up within that
49
+ window, not on the very next request.
48
50
 
49
51
  ## Roles
50
52
 
@@ -60,8 +62,12 @@ export default class AdminController {
60
62
 
61
63
  Not signed in → `401`. Signed in with a different (or missing) role → `403`. A
62
64
  role gate implies authentication, so the caller is resolved even on a route with
63
- no `@User()` parameter. The role is read from the verified profile per request,
64
- so revoking it takes effect on the next call rather than at token expiry.
65
+ no `@User()` parameter.
66
+
67
+ The role is read from the verified profile, not from a claim baked into the
68
+ token, so revoking it takes effect **within ~30 seconds** — the runtime caches a
69
+ verified identity for that long — rather than whenever the token happens to
70
+ expire.
65
71
 
66
72
  ## Email verification
67
73
 
@@ -689,6 +689,8 @@ admin users API); `role` is the **database** role RLS reads and is always
689
689
  `emailVerified` is likewise read from the verified profile rather than a JWT
690
690
  claim: a claim is only true as of when the token was minted, so a user who
691
691
  verifies mid-session would keep reporting `false` until their token expired.
692
+ Profile reads are cached for ~30 seconds, so a change shows up within that
693
+ window, not on the very next request.
692
694
 
693
695
  ## Roles
694
696
 
@@ -704,8 +706,12 @@ export default class AdminController {
704
706
 
705
707
  Not signed in → `401`. Signed in with a different (or missing) role → `403`. A
706
708
  role gate implies authentication, so the caller is resolved even on a route with
707
- no `@User()` parameter. The role is read from the verified profile per request,
708
- so revoking it takes effect on the next call rather than at token expiry.
709
+ no `@User()` parameter.
710
+
711
+ The role is read from the verified profile, not from a claim baked into the
712
+ token, so revoking it takes effect **within ~30 seconds** — the runtime caches a
713
+ verified identity for that long — rather than whenever the token happens to
714
+ expire.
709
715
 
710
716
  ## Email verification
711
717
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palbase/backend",
3
- "version": "14.1.0",
3
+ "version": "14.2.0",
4
4
  "description": "Palbase Backend SDK — class controllers (@Controller/@Get/@Post + @Body/@QueryParams/@Param), error classes, schema DSL",
5
5
  "license": "MIT",
6
6
  "repository": {