@authsignal/react
Version:
React components for [Authsignal](https://authsignal.com).
15 lines • 646 B
TypeScript
import { ChallengeProps, StartChallengeAsyncOptions, StartChallengeOptions } from "./types";
type ChallengeErrorCodes = "USER_CANCELED" | "TOKEN_EXPIRED" | "EXISTING_CHALLENGE";
export declare class ChallengeError extends Error {
code: ChallengeErrorCodes;
constructor(code: ChallengeErrorCodes, message: string);
}
export declare function useAuthsignal(): {
challenge: ChallengeProps | undefined;
startChallenge: (options: StartChallengeOptions) => Promise<void>;
startChallengeAsync: (options: StartChallengeAsyncOptions) => Promise<{
token: string;
}>;
};
export {};
//# sourceMappingURL=use-authsignal.d.ts.map