Back to Node Auth0

Type Alias TokenResponseSecurity

docs/types/auth.SDK.TokenResponse-1.html

5.9.11.6 KB
Original Source

Type Alias TokenResponseSecurity

Standardized token response structure for Auth0 authentication flows

Remarks

Token Lifetime Management :

  • Cache tokens according to expires_in value

  • Rotate refresh tokens using offline_access scope

  • Revoke compromised tokens immediately

  • Store tokens in secure, encrypted storage

  • Never expose in client-side code or logs

type TokenResponse = {
access_token: string;
refresh_token?: string;
id_token: string;
token_type?: string;
expires_in: number;
scope: string;
}

Index

Properties

access_tokenrefresh_token?id_tokentoken_type?expires_inscope

Properties

access_token

access_token: string

Bearer token for API authorization

Optionalrefresh_token

refresh_token?: string

Refresh token (requires offline_access scope)

id_token

id_token: string

JWT containing user identity claims

Optionaltoken_type

token_type?: string

Typically "Bearer"

expires_in

expires_in: number

Token validity in seconds (default: 86400)

scope

scope: string

Granted permissions space

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Properties access_tokenrefresh_tokenid_tokentoken_typeexpires_inscope