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
Bialymodelu
BialymodeluOP3mo ago
i also tried every llm and still had no result. Got headache
Bialymodelu
BialymodeluOP3mo ago
yeah, i’m looking for practical usage in code
The Untraceable
The Untraceable3mo ago
const { data, error } = await authClient.emailOtp.checkVerificationOtp({ email: "user@example.com", // required type: "sign-in", // required otp: "123456", // required });
Bialymodelu
BialymodeluOP3mo ago
i mean practical usage
The Untraceable
The Untraceable3mo ago
What else do you need?
Bialymodelu
BialymodeluOP3mo ago
like checking if otp is valid and operating on its result because it does return objects or success object
The Untraceable
The Untraceable3mo ago
Check your intelisense
Bialymodelu
BialymodeluOP3mo ago
pretty mess to me
The Untraceable
The Untraceable3mo ago
Control Space at data. And it should show you whats available

Did you find this page helpful?