UNPKG

logto-auth-node-sdk

Version:

A comprehensive Logto authentication client library with circuit breaker pattern support

56 lines (55 loc) 1.37 kB
import { CircuitBreakerOptions } from "./circuit-breaker-types"; export interface LogtoConfig { authEndpoint: string; appId: string; appSecret: string; resourceEndpoint: string; timeout?: number; circuitBreakerOptions?: CircuitBreakerOptions; } export interface LogtoHeaders { Authorization: string; 'Content-Type': string; } export interface TokenResponse { access_token: string; expires_in: number; token_type: string; scope: string; } export interface OrganizationResponse { id: string; name: string; description?: string; customData?: Record<string, any>; createdAt: string; updatedAt: string; } export interface UserResponse { id: string; username?: string; primaryEmail?: string; primaryPhone?: string; name?: string; avatar?: string; customData?: Record<string, any>; identities?: Record<string, any>; lastSignInAt?: string; createdAt: string; updatedAt: string; profile?: { familyName?: string; givenName?: string; middleName?: string; nickname?: string; preferredUsername?: string; profile?: string; website?: string; gender?: string; birthdate?: string; zoneinfo?: string; locale?: string; }; applicationId?: string; isSuspended?: boolean; }