Skip to Content
DocumentationAdmin Back-officeSigninStep 5: Verify JWT on the server

Step 5: Verify JWT on the server

⏱ 10 min

After sign-in, the SDK holds a JWT (aud: transcodes-sdk). Send it to your API as Authorization: Bearer <token> and verify locally with ES256 — no round-trip to Transcodes per request.


Client

const token = await transcodes.token.getAccessToken(); await fetch('/api/me', { headers: { Authorization: `Bearer ${token}` }, });

Server

  1. Download public key (JWK) from Console → Authentication cluster → JSON Web Key.
  2. Verify with ES256 (not RS256). See JSON Web Key.
import { importJWK, jwtVerify } from 'jose'; const publicKey = await importJWK(TRANSCODES_PUBLIC_JWK, 'ES256'); const { payload } = await jwtVerify(token, publicKey); // payload.sub = member id, aud must be transcodes-sdk

Regenerating JWK in Console invalidates old keys — update your server copy.

Framework examples: Next.js · React

Next: Bonus: Member console

Last updated on