[PR #1067] [MERGED] feat: restore the user data in the response #3612

Closed
opened 2026-03-13 11:00:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1067
Author: @wh5938316
Created: 12/30/2024
Status: Merged
Merged: 12/31/2024
Merged by: @Bekacru

Base: mainHead: main


📝 Commits (3)

  • 0b520c2 feat: restore the user data in the response
  • fec881d feat: add user data to APIs generating a new session
  • 5bc3be0 Merge branch 'better-auth:main' into main

📊 Changes

11 files changed (+217 additions, -27 deletions)

View changed files

📝 packages/better-auth/src/api/routes/email-verification.ts (+10 -0)
📝 packages/better-auth/src/api/routes/sign-in.ts (+13 -4)
📝 packages/better-auth/src/api/routes/sign-up.ts (+18 -0)
📝 packages/better-auth/src/api/routes/update-user.ts (+9 -0)
📝 packages/better-auth/src/plugins/anonymous/index.ts (+8 -0)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+37 -1)
📝 packages/better-auth/src/plugins/magic-link/index.ts (+9 -0)
📝 packages/better-auth/src/plugins/one-tap/index.ts (+32 -15)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+54 -7)
📝 packages/better-auth/src/plugins/two-factor/verify-middleware.ts (+18 -0)
📝 packages/better-auth/src/plugins/username/index.ts (+9 -0)

📄 Description

I propose restoring the user data in the response of api.signUpEmail to complete the registration flow in my Nest.js application. Without this change, I am restricted to using versions of better-auth prior to v1.0.23.

The issue I am facing is described in #1036. Importantly, this modification does not break any existing functionality. Notably, the api.signInEmail endpoint already includes the user data in its response (which seems to be an oversight).

I kindly request that this PR be merged as a temporary measure.


🔄 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/1067 **Author:** [@wh5938316](https://github.com/wh5938316) **Created:** 12/30/2024 **Status:** ✅ Merged **Merged:** 12/31/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`0b520c2`](https://github.com/better-auth/better-auth/commit/0b520c2bc5c46db26806508d0744a5bd78333501) feat: restore the user data in the response - [`fec881d`](https://github.com/better-auth/better-auth/commit/fec881d739cb267a3072b00e9db029c8b9729fe4) feat: add user data to APIs generating a new session - [`5bc3be0`](https://github.com/better-auth/better-auth/commit/5bc3be0b073f71e1367c964a384e4493a9a49fc6) Merge branch 'better-auth:main' into main ### 📊 Changes **11 files changed** (+217 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+10 -0) 📝 `packages/better-auth/src/api/routes/sign-in.ts` (+13 -4) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+18 -0) 📝 `packages/better-auth/src/api/routes/update-user.ts` (+9 -0) 📝 `packages/better-auth/src/plugins/anonymous/index.ts` (+8 -0) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+37 -1) 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+9 -0) 📝 `packages/better-auth/src/plugins/one-tap/index.ts` (+32 -15) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+54 -7) 📝 `packages/better-auth/src/plugins/two-factor/verify-middleware.ts` (+18 -0) 📝 `packages/better-auth/src/plugins/username/index.ts` (+9 -0) </details> ### 📄 Description I propose restoring the user data in the response of api.signUpEmail to complete the registration flow in my Nest.js application. Without this change, I am restricted to using versions of better-auth prior to v1.0.23. The issue I am facing is described in #1036. Importantly, this modification does not break any existing functionality. Notably, the api.signInEmail endpoint already includes the user data in its response (which seems to be an oversight). I kindly request that this PR be merged as a temporary measure. --- <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-03-13 11:00:53 -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#3612