JWT Verification
Verify access tokens locally and refresh JWKS on key rotation
Verify Gwop access tokens locally with jose. Do not call the API on every request just to check a signature.
Why this pattern
- JWT signature verification stays local and fast
- Gwop JWKS is fetched on cold start
- the verifier refreshes JWKS only when a token carries an unknown
kid sidis preserved so the app can perform a live session lookup when revocation matters
Recommended shape
What this does not replace
Local JWT verification proves signature, issuer, audience, and expiry. It does not replace a live session lookup if you need to reject revoked sessions immediately. Keep sid so you can pair local verification with gwop.authSessions.get() when needed.