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

Open
opened 2026-03-13 13:25:58 -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: 🔄 Open

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


📝 Commits (1)

  • 8fba8ff fix(magic-link): return additional fields in /magic-link/verify endpoint

📊 Changes

2 files changed (+74 additions, -9 deletions)

View changed files

📝 packages/better-auth/src/plugins/magic-link/index.ts (+3 -9)
📝 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:** 🔄 Open **Base:** `canary` ← **Head:** `himself65/2026/01/09/parse-schema` --- ### 📝 Commits (1) - [`8fba8ff`](https://github.com/better-auth/better-auth/commit/8fba8fff2b0f1cfcf5f3a08af0e2e5ebf26d117c) fix(magic-link): return additional fields in `/magic-link/verify` endpoint ### 📊 Changes **2 files changed** (+74 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+3 -9) 📝 `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-03-13 13:25:58 -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#7155