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
| Property | Type | Description |
|---|---|---|
accessToken | string | New access token (JWT) |
refreshToken | string | New refresh token (JWT) |
accessTokenExpiresAt | number | Access token expiry timestamp (milliseconds since epoch) |
refreshTokenExpiresAt | number | Refresh token expiry timestamp (milliseconds since epoch) |
Example
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"accessTokenExpiresAt": 1704067200000,
"refreshTokenExpiresAt": 1704153600000
}
Related Types
AuthResponse- Contains tokens on successful authenticationNAuthClientConfig- Token delivery configuration
Used By
- NAuthClient.refreshTokens() - Returns
TokenResponse - Token Management - Token refresh strategy guide
- Angular Interceptor - Automatic token refresh