/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-using-verifywithjwk-caacb6cc9886-using-verifywithjwks-outside-of-middleware-s0322-c0000.md
Using `verifyWithJwks` outside of middleware - hono-docs
Using verifyWithJwks outside of middleware Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt using...
Using verifyWithJwks outside of middleware
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#using-verifywithjwks-outside-of-middleware
Summary
The verifyWithJwks utility function can be used to verify JWT tokens outside of Hono's middleware context, such as in SvelteKit SSR pages or other server-side environments: ```ts const idpayload = await verifyWithJwks( idtoken, { jwk...
Content
The verifyWithJwks utility function can be used to verify JWT tokens outside of Hono's middleware context, such as in SvelteKit SSR pages or other server-side environments:
const id_payload = await verifyWithJwks(
id_token,
{
jwks_uri: 'https://your-auth-server/.well-known/jwks.json',
allowedAlgorithms: ['RS256'],
},
{
cf: { cacheEverything: true, cacheTtl: 3600 },
}
)