[PR #2645] [CLOSED] feat(magic-link): add customizable error and new user callbacks #21322

Closed
opened 2026-04-15 20:17:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2645
Author: @lucasthevenet
Created: 5/13/2025
Status: Closed

Base: mainHead: feat/magic-link-custom-callbacks


📝 Commits (3)

  • 060b95c feat(magic-link): add customizable error and new user callbacks
  • bceb6bb feat(magic-link): fix file modified by mistake
  • bc7e950 fix(magic-link): remove eof

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/magic-link/index.ts (+69 -15)
📝 packages/better-auth/src/plugins/magic-link/magic-link.test.ts (+64 -1)
packages/better-auth/src/plugins/magic-link/utils.ts (+3 -0)

📄 Description

This pull request adds support for two new optional parameters to the magic link authentication flow: errorCallbackURL for redirecting users to a custom URL when an error occurs during verification, and newUserCallbackURL for redirecting new users after successful sign-up.


🔄 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/2645 **Author:** [@lucasthevenet](https://github.com/lucasthevenet) **Created:** 5/13/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/magic-link-custom-callbacks` --- ### 📝 Commits (3) - [`060b95c`](https://github.com/better-auth/better-auth/commit/060b95c8bf60e7aab2fc0b6c9631b327d2e9ffe7) feat(magic-link): add customizable error and new user callbacks - [`bceb6bb`](https://github.com/better-auth/better-auth/commit/bceb6bbe70aab80d3c33c4300172133a7c14c6a5) feat(magic-link): fix file modified by mistake - [`bc7e950`](https://github.com/better-auth/better-auth/commit/bc7e9507ceebfe51722de91e5dd528bb0eaa9046) fix(magic-link): remove eof ### 📊 Changes **3 files changed** (+136 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+69 -15) 📝 `packages/better-auth/src/plugins/magic-link/magic-link.test.ts` (+64 -1) ➕ `packages/better-auth/src/plugins/magic-link/utils.ts` (+3 -0) </details> ### 📄 Description This pull request adds support for two new optional parameters to the magic link authentication flow: `errorCallbackURL` for redirecting users to a custom URL when an error occurs during verification, and `newUserCallbackURL` for redirecting new users after successful sign-up. --- <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-15 20:17:06 -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#21322