[GH-ISSUE #1411] emailOTP documentation issue #17371

Closed
opened 2026-04-15 15:30:19 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @matthiasfeist on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1411

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). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1411 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)
GiteaMirror added the locked label 2026-04-15 15:30:19 -05:00
Author
Owner

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

that's a typo on the docs

<!-- gh-comment-id:2651164659 --> @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 :)

<!-- gh-comment-id:2651279513 --> @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

<!-- gh-comment-id:2651296129 --> @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#17371