@wristband/express-auth
Version:
SDK for integrating your ExpressJS application with Wristband. Handles user authentication and token management.
17 lines (16 loc) • 729 B
TypeScript
import { TokenResponse, Userinfo } from './types';
export declare class WristbandService {
private wristbandApiClient;
private clientId;
private clientSecret;
private basicAuthConfig;
constructor(wristbandApplicationDomain: string, clientId: string, clientSecret: string);
getTokens(code: string, redirectUri: string, codeVerifier: string): Promise<TokenResponse>;
getUserinfo(accessToken: string): Promise<Userinfo>;
refreshToken(refreshToken: string): Promise<TokenResponse>;
revokeRefreshToken(refreshToken: string): Promise<void>;
private static isAxiosError;
private static hasInvalidGrantError;
private static getErrorDescription;
private static validateTokenResponse;
}