Documentation navigation
← Back to Jupiter Auth

JWT Claims

Decode and verify the claims carried by a Jupiter access token.

Verify the current access token

Without an explicit token, getClaims reads the current session. Asymmetric tokens are verified with the project JWKS and cached; other algorithms fall back to server validation through getUser.

const { data, error } = await client.auth.getClaims() if (data) {  console.log(data.claims)  console.log(data.header)}

Verify a supplied token

Pass an access token explicitly when the token is not stored in the current Auth client.

const { data, error } =  await client.auth.getClaims(accessToken)

Supply a JWKS

Pass a JSON Web Key Set when the application already has the project signing keys. Supplied keys take precedence over the client’s cached JWKS.

const { data, error } = await client.auth.getClaims(  accessToken,  {    jwks: {      keys    }  })