Token & JWKS Reference

A reference for the access tokens vuer-auth issues, the claims they carry, and the JWKS endpoints used to verify them.


Environments

EnvironmentBase URL
Staginghttps://staging-auth.vuer.ai
Productionhttps://auth.vuer.ai

The issuer (iss) of a token is the base URL of the server that issued it.


Signing algorithm

Tokens are JWTs signed with EdDSA (Ed25519).

  • Algorithm header: alg: "EdDSA"
  • Faster signing and smaller signatures than RS256.
  • Always pin algorithms: ["EdDSA"] when verifying — never accept alg: none or an unexpected algorithm.

Claims

A decoded access token looks like:

{
  "sub": "user-id",              // stable user id — use this as your primary key
  "email": "user@example.com",
  "name": "Jane Doe",
  "username": "jane",
  "email_verified": true,
  "iss": "https://auth.vuer.ai", // issuer = the server base URL
  "aud": "your-client-id",       // audience = the clientId the token was issued for
  "iat": 1710000000,             // issued-at (seconds)
  "exp": 1710604800              // expiry (seconds) — default lifetime is 7 days
}
ClaimMeaning
subStable user identifier. Prefer this over email (emails change).
email, email_verifiedUser email and whether it's verified.
name, usernameDisplay name and username.
issIssuer — the base URL of the auth server.
audThe clientId the token was issued for (see Register an App).
iat, expIssued-at and expiry, in seconds. Default lifetime is 7 days.

JWKS endpoints

The public signing keys are published as a JSON Web Key Set:

PathNotes
GET /.well-known/jwks.jsonRecommended — the standard, issuer-advertised location.
GET /api/auth/jwksCompatible alternative; serves the same keys.

A JWKS response looks like:

{
  "keys": [
    {
      "kty": "OKP",
      "crv": "Ed25519",
      "alg": "EdDSA",
      "use": "sig",
      "kid": "…",
      "x": "…"           // public key material
    }
  ]
}

Tip: Use createRemoteJWKSet(new URL("…/.well-known/jwks.json")) so the keys are fetched, cached, and automatically refreshed on rotation. Create it once at module scope.


Verifying

import { createRemoteJWKSet, jwtVerify } from "jose";

const JWKS = createRemoteJWKSet(
  new URL("https://staging-auth.vuer.ai/.well-known/jwks.json"),
);

const { payload } = await jwtVerify(token, JWKS, {
  algorithms: ["EdDSA"],
  // issuer: "https://staging-auth.vuer.ai", // optional
  // audience: "your-client-id",             // optional
});

See Verify JWT for full backend examples (Express, Fastify, other languages).


See Also