[PR #7223] [MERGED] fix(magic-link): return additional fields in /magic-link/verify #32756

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7223
Author: @himself65
Created: 1/9/2026
Status: Merged
Merged: 3/26/2026
Merged by: @ping-maxwell

Base: mainHead: himself65/2026/01/09/parse-schema


📝 Commits (2)

  • 8fba8ff fix(magic-link): return additional fields in /magic-link/verify endpoint
  • 32d5ae4 Merge branch 'main' into himself65/2026/01/09/parse-schema

📊 Changes

2 files changed (+73 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/plugins/magic-link/index.ts (+2 -1)
📝 packages/better-auth/src/plugins/magic-link/magic-link.test.ts (+71 -0)

📄 Description

Related: https://github.com/better-auth/better-auth/issues/4262


Summary by cubic

Update the /magic-link/verify endpoint to return parsed user and session objects so clients receive custom user fields and session data after verification.

  • Bug Fixes
    • Use parseUserOutput and parseSessionOutput in verify response to include additional user fields and session details.
    • Add tests to confirm custom user fields (e.g., foo) are returned and update correctly.

Written for commit 8fba8fff2b. 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/7223 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/9/2026 **Status:** ✅ Merged **Merged:** 3/26/2026 **Merged by:** [@ping-maxwell](https://github.com/ping-maxwell) **Base:** `main` ← **Head:** `himself65/2026/01/09/parse-schema` --- ### 📝 Commits (2) - [`8fba8ff`](https://github.com/better-auth/better-auth/commit/8fba8fff2b0f1cfcf5f3a08af0e2e5ebf26d117c) fix(magic-link): return additional fields in `/magic-link/verify` endpoint - [`32d5ae4`](https://github.com/better-auth/better-auth/commit/32d5ae494d0ab8fed4e86006dd6e795cdb61a85c) Merge branch 'main' into himself65/2026/01/09/parse-schema ### 📊 Changes **2 files changed** (+73 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/magic-link/magic-link.test.ts` (+71 -0) </details> ### 📄 Description Related: https://github.com/better-auth/better-auth/issues/4262 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Update the /magic-link/verify endpoint to return parsed user and session objects so clients receive custom user fields and session data after verification. - **Bug Fixes** - Use parseUserOutput and parseSessionOutput in verify response to include additional user fields and session details. - Add tests to confirm custom user fields (e.g., foo) are returned and update correctly. <sup>Written for commit 8fba8fff2b0f1cfcf5f3a08af0e2e5ebf26d117c. 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:30:03 -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#32756