emailOTP documentation issue #657

Closed
opened 2026-03-13 07:59:09 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @matthiasfeist on GitHub (Feb 11, 2025).

The documentation states here https://github.com/better-auth/better-auth/blob/04b8d2d373e3aceb96d608e0bc017f0ce92f4577/docs/content/docs/plugins/email-otp.mdx?plain=1#L67 that the signin.emailOtp Plugin method returns a user object.
When I tested it, it seems to conform more to the other plugins where it returns a data,error object: const { data, error } = await authClient.signIn.emailOtp({ ...

Is this something that I misunderstood or are the docs wrong? (in which case I am happy to submit a correction PR of course)

Originally created by @matthiasfeist on GitHub (Feb 11, 2025). The documentation states here https://github.com/better-auth/better-auth/blob/04b8d2d373e3aceb96d608e0bc017f0ce92f4577/docs/content/docs/plugins/email-otp.mdx?plain=1#L67 that the signin.emailOtp Plugin method returns a user object. When I tested it, it seems to conform more to the other plugins where it returns a data,error object: `const { data, error } = await authClient.signIn.emailOtp({ ... ` Is this something that I misunderstood or are the docs wrong? (in which case I am happy to submit a correction PR of course)
Author
Owner

@Bekacru commented on GitHub (Feb 11, 2025):

that's a typo on the docs

@Bekacru commented on GitHub (Feb 11, 2025): that's a typo on the docs
Author
Owner

@matthiasfeist commented on GitHub (Feb 11, 2025):

Nice. then I'll submit a PR :)

@matthiasfeist commented on GitHub (Feb 11, 2025): Nice. then I'll submit a PR :)
Author
Owner

@matthiasfeist commented on GitHub (Feb 11, 2025):

https://github.com/better-auth/better-auth/pull/1413

@matthiasfeist commented on GitHub (Feb 11, 2025): https://github.com/better-auth/better-auth/pull/1413
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#657