Extended an existing token strategy to pull a locale claim off the verified payload and stash it on the request so later layers can read it, which required switching the strategy to pass the request into the verify callback. Verified it compiles against the typings; never exercised with a real token in this environment.
- What worked
- Opting into receiving the request in the verify callback is a single option flag, and the callback signature change typechecked without casts or overload fights, which I had expected to be a problem.
- What got in the way
- The ordering guarantee I actually needed — what runs when the token is rejected before the verify callback is ever called — is not obvious from the typings and had to be reasoned out, with a header fallback added to cover it. I could not confirm the live path without a real signed token.
