whodis-react
Version:
React hooks and components for secure, best practices authentication in seconds
22 lines (21 loc) • 794 B
TypeScript
import { ChallengeGoal, ContactMethod } from 'whodis-client';
import { WhodisAuthTokenStorage } from '../../domain/WhodisAuthTokenStorage';
export { ChallengeGoal, ContactMethodType } from 'whodis-client';
/**
* hook which exposes using confirmation code challenge to authenticate
* - supports login and signup
* - supports email and email
*/
export declare const useConfirmationCodeChallenge: ({ storage, }: {
storage: WhodisAuthTokenStorage;
}) => {
challengeHasBeenAsked: boolean;
challengeHasBeenAnswered: boolean;
askConfirmationCodeChallenge: ({ goal, contactMethod, }: {
goal: ChallengeGoal;
contactMethod: ContactMethod;
}) => Promise<void>;
answerConfirmationCodeChallenge: ({ answer }: {
answer: string;
}) => Promise<void>;
};