Skip to main content

TokenResponse

Package: @nauth-toolkit/client Type: Response

Response from token refresh operations containing new access and refresh tokens with expiry timestamps.

import { TokenResponse } from '@nauth-toolkit/client';

Properties

PropertyTypeDescription
accessTokenstringNew access token (JWT)
refreshTokenstringNew refresh token (JWT)
accessTokenExpiresAtnumberAccess token expiry timestamp (milliseconds since epoch)
refreshTokenExpiresAtnumberRefresh token expiry timestamp (milliseconds since epoch)

Example

{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"accessTokenExpiresAt": 1704067200000,
"refreshTokenExpiresAt": 1704153600000
}

Used By