[PR #2363] [MERGED] fix: pass context into createVerificationValue #4280

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2363
Author: @Livog
Created: 4/19/2025
Status: Merged
Merged: 5/9/2025
Merged by: @Bekacru

Base: mainHead: main


📝 Commits (1)

  • 8ad7ccc fix: pass context into createVerificationValue

📊 Changes

10 files changed (+178 additions, -124 deletions)

View changed files

📝 packages/better-auth/src/api/routes/forget-password.ts (+8 -5)
📝 packages/better-auth/src/api/routes/update-user.ts (+13 -10)
📝 packages/better-auth/src/oauth2/state.ts (+8 -5)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+40 -25)
📝 packages/better-auth/src/plugins/magic-link/index.ts (+10 -7)
📝 packages/better-auth/src/plugins/oidc-provider/authorize.ts (+31 -28)
📝 packages/better-auth/src/plugins/passkey/index.ts (+21 -15)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+31 -19)
📝 packages/better-auth/src/plugins/two-factor/index.ts (+8 -5)
📝 packages/better-auth/src/plugins/two-factor/otp/index.ts (+8 -5)

📄 Description

ctx wasn’t passed down before, so in config.databaseHooks.verification.create.before = async (verification, ctx) => {} the ctx argument was undefined in some cases. Now we forward ctx so the hook can receive it as expected.


🔄 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/2363 **Author:** [@Livog](https://github.com/Livog) **Created:** 4/19/2025 **Status:** ✅ Merged **Merged:** 5/9/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`8ad7ccc`](https://github.com/better-auth/better-auth/commit/8ad7ccc1a1f45745bf7381422ac2541b916627cd) fix: pass context into createVerificationValue ### 📊 Changes **10 files changed** (+178 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/forget-password.ts` (+8 -5) 📝 `packages/better-auth/src/api/routes/update-user.ts` (+13 -10) 📝 `packages/better-auth/src/oauth2/state.ts` (+8 -5) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+40 -25) 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+10 -7) 📝 `packages/better-auth/src/plugins/oidc-provider/authorize.ts` (+31 -28) 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+21 -15) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+31 -19) 📝 `packages/better-auth/src/plugins/two-factor/index.ts` (+8 -5) 📝 `packages/better-auth/src/plugins/two-factor/otp/index.ts` (+8 -5) </details> ### 📄 Description ctx wasn’t passed down before, so in `config.databaseHooks.verification.create.before = async (verification, ctx) => {}` the `ctx` argument was `undefined` in some cases. Now we forward ctx so the hook can receive it as expected. --- <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:40:21 -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#4280