Skip to content

API Reference

Complete API documentation for auth-kit-js.

Import Paths

PathEnvironmentDescription
auth-kit-jsUniversalCore types and providers
auth-kit-js/frontendBrowserOAuth flow helpers
auth-kit-js/backendNode.jsVerification handlers
auth-kit-js/expressNode.jsExpress router
auth-kit-js/coreUniversalTypes, errors, utilities

Core Types

NormalizedProfile

typescript
interface NormalizedProfile {
  provider: "google" | "facebook" | "telegram";
  providerUserId: string;
  email?: string;
  name?: string;
  avatarUrl?: string;
  raw: unknown;
}

GoogleOAuthConfig

typescript
interface GoogleOAuthConfig {
  clientId: string;
  clientSecret: string;
  redirectUri: string;
  scopes?: string[];
}

FacebookOAuthConfig

typescript
interface FacebookOAuthConfig {
  clientId: string;
  clientSecret: string;
  redirectUri: string;
  scopes?: string[];
}

TelegramConfig

typescript
interface TelegramConfig {
  botToken: string;
  authDateTTL?: number; // seconds, default: 86400
}

Pages

Released under the MIT License.