Commit 51ce56d
committed
feat(clerk-js): Send previous token and force_origin on /tokens requests
Two changes to Session.#createTokenResolver():
1. Send the current session JWT as `token` in the POST body on
non-template /tokens requests. This lets the FAPI Proxy forward it
to Session Minter for claim cloning without a DB read.
2. Send `force_origin=true` in the query string when skipCache is true.
This tells the FAPI Proxy to route directly to origin instead of
Session Minter, preserving the skipCache contract of always returning
authoritative DB-minted tokens.1 parent 0b0f119 commit 51ce56d
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
484 | 489 | | |
485 | 490 | | |
486 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
487 | 496 | | |
488 | 497 | | |
489 | 498 | | |
| |||
0 commit comments