@badgateway/oauth2-client
Version:
OAuth2 client for browsers and Node.js. Tiny footprint, PKCE support
33 lines (32 loc) • 705 B
TypeScript
/**
* Token information
*/
export type OAuth2Token = {
/**
* OAuth2 Access Token
*/
accessToken: string;
/**
* When the Access Token expires.
*
* This is expressed as a unix timestamp in milliseconds.
*/
expiresAt: number | null;
/**
* OAuth2 refresh token
*/
refreshToken: string | null;
/**
* OpenID Connect ID Token
*/
idToken?: string;
/**
* List of scopes that the access token is valid for.
* (May be omitted if identical to the requested scope)
*/
scope?: string[];
/**
* Additional tokens properties returned by the OAuth2 server.
*/
extraParams?: Record<string, any>;
};