remix-auth-totp
Version:
A Time-Based One-Time Password (TOTP) Authentication Strategy for Remix-Auth.
25 lines (24 loc) • 1.45 kB
TypeScript
export declare const STRATEGY_NAME = "TOTP";
export declare const FORM_FIELDS: {
readonly EMAIL: "email";
readonly CODE: "code";
};
export declare const SESSION_KEYS: {
readonly EMAIL: "auth:email";
readonly TOTP: "auth:totp";
};
export declare const ERRORS: {
readonly REQUIRED_EMAIL: "Please enter your email address to continue.";
readonly INVALID_EMAIL: "That doesn't look like a valid email address. Please check and try again.";
readonly INVALID_TOTP: "That code didn't work. Please check and try again, or request a new code.";
readonly EXPIRED_TOTP: "That code has expired. Please request a new one.";
readonly MISSING_SESSION_EMAIL: "We couldn't find an email to verify. Please use the same browser you started with or restart from this browser.";
readonly MISSING_SESSION_TOTP: "We couldn't find an active verification session. Please request a new code.";
readonly RATE_LIMIT_EXCEEDED: "Too many incorrect attempts. Please request a new code.";
readonly REQUIRED_ENV_SECRET: "Missing required .env secret.";
readonly USER_NOT_FOUND: "User not found.";
readonly INVALID_MAGIC_LINK_PATH: "Invalid magic-link expected path.";
readonly REQUIRED_EMAIL_SENT_REDIRECT_URL: "Missing required emailSentRedirect URL.";
readonly REQUIRED_SUCCESS_REDIRECT_URL: "Missing required successRedirect URL.";
readonly REQUIRED_FAILURE_REDIRECT_URL: "Missing required failureRedirect URL.";
};