UNPKG

@authsignal/react

Version:

React components for [Authsignal](https://authsignal.com).

58 lines 1.75 kB
export type AppearanceVariables = { colorPrimary?: string; colorPrimaryForeground?: string; colorBackground?: string; colorForeground?: string; colorDanger?: string; colorRing?: string; colorMuted?: string; colorInputBorder?: string; spacingUnit?: string; borderRadius?: string; }; export type Appearance = { theme?: "authsignal"; variables?: AppearanceVariables; }; export type AuthsignalProviderProps = { baseUrl?: "https://api.authsignal.com/v1" | "https://au.api.authsignal.com/v1" | "https://eu.api.authsignal.com/v1" | (string & {}); tenantId: string; appearance?: Appearance; children: React.ReactNode; }; export declare const VerificationMethod: { readonly PASSKEY: "PASSKEY"; readonly SECURITY_KEY: "SECURITY_KEY"; readonly EMAIL_OTP: "EMAIL_OTP"; readonly EMAIL_MAGIC_LINK: "EMAIL_MAGIC_LINK"; readonly AUTHENTICATOR_APP: "AUTHENTICATOR_APP"; readonly SMS: "SMS"; }; export type TVerificationMethod = (typeof VerificationMethod)[keyof typeof VerificationMethod]; export type ChallengeOptions = { token: string; defaultVerificationMethod?: TVerificationMethod; verificationMethods?: TVerificationMethod[]; user?: { email?: string; phoneNumber?: string; }; }; type ChallengeCallbacks = { onChallengeSuccess?: (params: { token: string; }) => void; onCancel?: () => void; onTokenExpired?: () => void; }; export type ChallengeProps = { challengeOptions: ChallengeOptions; } & ChallengeCallbacks; export type StartChallengeOptions = { token: string; } & ChallengeCallbacks; export type StartChallengeAsyncOptions = { token: string; }; export {}; //# sourceMappingURL=types.d.ts.map