Commit e99fb6c
committed
Align custom-claim docs with actual JWT behavior
The client auth helpers advertise overlapping custom claims as taking precedence over reserved JWT claims, but the implementation re-applies the reserved claims through SignJWT setters. This change narrows the scope to documentation and a focused regression test so the published contract matches shipped behavior without expanding API surface or changing runtime semantics.
Constraint: Upstream review guidance prefers small, spec-aware fixes backed by concrete evidence
Rejected: Change runtime behavior so custom claims override reserved claims | would alter shipped semantics and widen scope beyond a docs fix
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep reserved JWT claims authoritative unless maintainers explicitly decide to change runtime behavior in a separate design discussion
Tested: packages/client/authExtensions test suite; client package typecheck; client package lint/prettier
Not-tested: full monorepo test matrix1 parent 9ed62fe commit e99fb6c
2 files changed
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
451 | 480 | | |
452 | 481 | | |
453 | 482 | | |
| |||
0 commit comments