Menu
Important
Stay updated on React2Shell

Tokens

Last updated November 26, 2025

There are three tokens your application will work with when using Sign in with Vercel:

The ID Token is a signed JWT that contains information about the user who is signing in. When using ID Token claims, your application should both decode the token and verify its signature against the public JWKS endpoint to ensure authenticity. The ID Token does not give access to Vercel resources, it only proves the user's identity.

The code below shows how to decode and validate an ID token using the jose library:

Vercel's IdP generates OpenID Connect tokens that contain various JWT claims depending on the requested scopes:

ClaimTypeDescriptionExample
stringIssuer - The server that issued the token
stringSubject - Unique identifier for the authenticated user
stringAudience - The ID of the Vercel application
numberExpiration time - Unix timestamp when the token expires
numberIssued at - Unix timestamp when the token was issued
numberNot before - Unix timestamp before which the token is invalid
stringJWT ID - Unique identifier for this specific token
stringCryptographic nonce for replay protection

Depending on the scopes requested the following claims will be included in the ID Token:

ScopeClaimsDescriptionExample
The user's full display name
The user's username on Vercel
URL to the user's avatar image (only if user has an avatar)
The user's email address

The Access Token grants your application permission to access specific resources on Vercel on behalf of the user trying to sign in. It is used to authenticate requests to Vercel's REST API. Access Tokens use an opaque format that ensures they are not readable by humans, are secure, and have server side validation to ensure they are not tampered with.

Access Tokens are valid for one hour. Refresh Tokens can be exchanged to receive new Access Tokens when they expire. Refresh Tokens are valid for 30 days. When you exchange a Refresh Token for an Access Token, you also receive a new Refresh Token.

When using the Access Token in your application code to fetch the user's data, it must be included in the header as a Bearer token.

Refresh Tokens allow your application to get a new Access Token without asking the user to sign in again. The token lasts for 30 days and rotates each time it's used. When the Access Token expires or is about to expire, a Refresh Token can be exchanged for a new Access and Refresh token pair.

Each Refresh Token is single use and automatically rotated on exchange, invalidating the previous token.

Refresh Tokens use an opaque format that ensures they are not readable by humans, are secure, and have server side validation to ensure they are not tampered with.

Access and Refresh Tokens are sensitive credentials and should be stored securely. Never expose them to the client side of your application.


Was this helpful?

supported.