OTP plugin usage
Hi, is there any reference code with showcase of usage email-otp plugin? Currently im strugling with checking otp code, cant get how to determine if otp typed by user is valid.
10 Replies
i also tried every llm and still had no result. Got headache
Email OTP | Better Auth
Email OTP plugin for Better Auth.
yeah, i’m looking for practical usage
in code
const { data, error } = await authClient.emailOtp.checkVerificationOtp({
    email: "user@example.com", // required
    type: "sign-in", // required
    otp: "123456", // required
});
i mean practical usage
What else do you need?
like checking if otp is valid and operating on its result
because it does return objects or success object
Check your intelisense
pretty mess to me
Control Space at 
data.
And it should show you whats available