UNPKG

@tradly/auth

Version:

Auth package for Tradly - handles authentication (email, phone, social login)

29 lines (28 loc) 1.15 kB
/** * Auth Type Service * Validates auth type from configs (calls Utility package) * * Note: This requires @tradly/utility package to be installed * For now, we'll make it optional and provide a direct implementation */ import { RequestOptions } from "../types"; /** * Get auth type from configs * This should call Utility package's getConfigs, but for now uses direct fetch * TODO: Replace with Utility package import when available * Uses global config from initializeAuth * pkKey is optional - will be auto-fetched if not provided */ export declare function getAuthType(pkKey?: string, options?: RequestOptions): Promise<number | null>; /** * Check if email auth is enabled * Uses global config from initializeAuth * pkKey is optional - will be auto-fetched if not provided */ export declare function isEmailAuthEnabled(pkKey?: string, options?: RequestOptions): Promise<boolean>; /** * Check if phone auth is enabled * Uses global config from initializeAuth * pkKey is optional - will be auto-fetched if not provided */ export declare function isPhoneAuthEnabled(pkKey?: string, options?: RequestOptions): Promise<boolean>;