[PR #7876] [MERGED] feat(email-otp): support name, image and additionalFields in /sign-in/email-otp endpoint #33208

Closed
opened 2026-04-17 23:51:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7876
Author: @bytaesu
Created: 2/9/2026
Status: Merged
Merged: 2/10/2026
Merged by: @himself65

Base: canaryHead: 2026-02-09/feat/email-otp-sign-in-user-fields


📝 Commits (3)

  • 2f8d351 feat(email-otp): support name, image and additionalFields in signIn endpoint
  • 91db4ec docs: update email-otp content
  • 759e132 chore: spread order and naming

📊 Changes

3 files changed (+155 additions, -16 deletions)

View changed files

📝 docs/content/docs/plugins/email-otp.mdx (+11 -3)
📝 packages/better-auth/src/plugins/email-otp/email-otp.test.ts (+107 -0)
📝 packages/better-auth/src/plugins/email-otp/routes.ts (+37 -13)

📄 Description


Summary by cubic

Extend /sign-in/email-otp to accept name, image, and additional user fields on first-time sign-in. Apps can now set profile data during OTP signup without a follow-up update.

  • New Features
    • Added name and image to request body; applied only when creating a new user.
    • Accepts additionalFields per user schema; validated via parseUserInput.
    • Respects input: true/false and defaultValue; ignores input: false fields.
    • Updated docs to show name/image and note additional fields for new users.
    • Added tests for name/image and additionalFields, including default handling.

Written for commit 759e1321be. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7876 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/9/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-02-09/feat/email-otp-sign-in-user-fields` --- ### 📝 Commits (3) - [`2f8d351`](https://github.com/better-auth/better-auth/commit/2f8d351a6e128f72efcc9d05608adab165bb2e9c) feat(email-otp): support name, image and additionalFields in signIn endpoint - [`91db4ec`](https://github.com/better-auth/better-auth/commit/91db4ecc7da6e26c311c53c15a7c7442ffbbf640) docs: update email-otp content - [`759e132`](https://github.com/better-auth/better-auth/commit/759e1321be9f4491b68087dcfc78b441e8a0dc0a) chore: spread order and naming ### 📊 Changes **3 files changed** (+155 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/email-otp.mdx` (+11 -3) 📝 `packages/better-auth/src/plugins/email-otp/email-otp.test.ts` (+107 -0) 📝 `packages/better-auth/src/plugins/email-otp/routes.ts` (+37 -13) </details> ### 📄 Description - Closes #7868 - Closes #1557 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Extend /sign-in/email-otp to accept name, image, and additional user fields on first-time sign-in. Apps can now set profile data during OTP signup without a follow-up update. - **New Features** - Added name and image to request body; applied only when creating a new user. - Accepts additionalFields per user schema; validated via parseUserInput. - Respects input: true/false and defaultValue; ignores input: false fields. - Updated docs to show name/image and note additional fields for new users. - Added tests for name/image and additionalFields, including default handling. <sup>Written for commit 759e1321be9f4491b68087dcfc78b441e8a0dc0a. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 23:51:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#33208