Skip to main content

TypeAlias.AuthSendOtpArgs

type AuthSendOtpArgs = 
| {
emailInputName: string;
type: "email-otp";
}
| {
phoneCallingCode: string;
phoneInputName: string;
type: "phone-otp";
};

Arguments for sending a One-Time Password (OTP).

Examples

// Email OTP
const args: AuthSendOtpArgs = {
type: "email-otp",
emailInputName: "email",
};
// Phone/SMS OTP
const args: AuthSendOtpArgs = {
type: "phone-otp",
phoneCallingCode: "+33",
phoneInputName: "phone",
};