Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Tokens

Aero2 issues three types of JWT tokens, each serving a different purpose. All tokens are signed with RS256 (RSA + SHA-256) using keys that rotate automatically.

Token Types

Access Token

The access token authorizes API requests. Include it in the Authorization header.

PropertyValue
FormatJWT (RS256)
Lifetime1 hour
token_use claimaccess
UsageAuthorization: Bearer <token>

ID Token

The ID token contains identity claims about the user. It's only issued when the openid scope is requested.

PropertyValue
FormatJWT (RS256)
Lifetime1 hour
token_use claimid
Containssub, email, name, nonce, auth_time

Refresh Token

The refresh token is used to get new access tokens without re-authentication.

PropertyValue
FormatOpaque string
Lifetime7 days
StorageHMAC-hashed in database
RotationEnforced (old token invalidated on use)

Session Token

Session tokens are used internally by Aero2's web interface. They're stored in HttpOnly cookies.

PropertyValue
FormatJWT (RS256)
Lifetime1 hour
token_use claimsession
StorageHttpOnly, Secure, SameSite=Lax cookie

Token Verification

To verify an Aero2 token:

  1. Fetch the JWKS from /oauth2/jwks.json
  2. Find the key matching the token's kid header
  3. Verify the RS256 signature
  4. Check standard claims: iss, aud, exp, iat
// Example using jose library
import * as jose from 'jose';
 
const JWKS = jose.createRemoteJWKSet(
  new URL('https://aero2.dev/oauth2/jwks.json')
);
 
const { payload } = await jose.jwtVerify(token, JWKS, {
  issuer: 'https://aero2.dev',
  audience: 'your-client-id',
});

Inspect a Token

Paste a JWT below to decode it. Everything runs in your browser — nothing is sent to any server.

Paste a JWT above to see its decoded contents

See Also