[PR #5883] "Fix Magic Link plugin type and token handling for Better Auth CLI" #23195

Open
opened 2026-04-15 21:32:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5883
Author: @burak-mumcu
Created: 11/10/2025
Status: 🔄 Open

Base: mainHead: issue#5879


📝 Commits (1)

  • 77a831f "Fix Magic Link plugin type and token handling for Better Auth CLI"

📊 Changes

7 files changed (+60 additions, -23 deletions)

View changed files

📝 packages/better-auth/src/plugins/magic-link/index.ts (+4 -17)
packages/cli/getConfig_test-Ev6eQi/tsconfig.app.json (+7 -0)
packages/cli/getConfig_test-O1vppd/tsconfig.json (+10 -0)
packages/cli/getConfig_test-YJYfgh/test/server/auth/auth.ts (+12 -0)
packages/cli/getConfig_test-jfcL2m/server/auth/auth.ts (+12 -0)
packages/cli/getConfig_test-u2TlPR/packages/shared/tsconfig.json (+7 -0)
📝 packages/cli/tsconfig.json (+8 -6)

📄 Description

"Fix Magic Link plugin: update type handling, token storage, and verification logic for Better Auth CLI"


Summary by cubic

Fixes Magic Link token hashing and callback URL handling, and updates CLI tsconfig to work with NodeNext setups. Addresses Linear issue #5879.

  • Bug Fixes

    • Remove redundant type check so custom-hasher storeToken objects hash tokens correctly.
    • Standardize origin checks: decode callback URLs and default to "/" when missing.
  • Refactors

    • Update CLI tsconfig (ESNext module, NodeNext resolution, ES2022 target, baseUrl, path alias to core dist).
    • Add test fixtures for getConfig with varied tsconfig path mappings and Prisma-based auth setups.

Written for commit 77a831f6ea. Summary will update automatically 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/5883 **Author:** [@burak-mumcu](https://github.com/burak-mumcu) **Created:** 11/10/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `issue#5879` --- ### 📝 Commits (1) - [`77a831f`](https://github.com/better-auth/better-auth/commit/77a831f6eaed723965a167a06db6279f83cae8e2) "Fix Magic Link plugin type and token handling for Better Auth CLI" ### 📊 Changes **7 files changed** (+60 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+4 -17) ➕ `packages/cli/getConfig_test-Ev6eQi/tsconfig.app.json` (+7 -0) ➕ `packages/cli/getConfig_test-O1vppd/tsconfig.json` (+10 -0) ➕ `packages/cli/getConfig_test-YJYfgh/test/server/auth/auth.ts` (+12 -0) ➕ `packages/cli/getConfig_test-jfcL2m/server/auth/auth.ts` (+12 -0) ➕ `packages/cli/getConfig_test-u2TlPR/packages/shared/tsconfig.json` (+7 -0) 📝 `packages/cli/tsconfig.json` (+8 -6) </details> ### 📄 Description "Fix Magic Link plugin: update type handling, token storage, and verification logic for Better Auth CLI" <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes Magic Link token hashing and callback URL handling, and updates CLI tsconfig to work with NodeNext setups. Addresses Linear issue #5879. - **Bug Fixes** - Remove redundant type check so custom-hasher storeToken objects hash tokens correctly. - Standardize origin checks: decode callback URLs and default to "/" when missing. - **Refactors** - Update CLI tsconfig (ESNext module, NodeNext resolution, ES2022 target, baseUrl, path alias to core dist). - Add test fixtures for getConfig with varied tsconfig path mappings and Prisma-based auth setups. <sup>Written for commit 77a831f6eaed723965a167a06db6279f83cae8e2. Summary will update automatically 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-15 21:32:38 -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#23195