[PR #8353] [MERGED] fix(sso): use internalAdapter for verification operations #24817

Closed
opened 2026-04-15 22:34:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8353
Author: @himself65
Created: 3/4/2026
Status: Merged
Merged: 3/4/2026
Merged by: @himself65

Base: canaryHead: fix/8348-verification-schema


📝 Commits (1)

  • 081c939 fix(sso): use internalAdapter for verification operations

📊 Changes

3 files changed (+92 additions, -45 deletions)

View changed files

📝 packages/sso/src/domain-verification.test.ts (+73 -3)
📝 packages/sso/src/routes/domain-verification.ts (+14 -32)
📝 packages/sso/src/routes/sso.ts (+5 -10)

📄 Description

Summary

  • SSO domain-verification and provider registration routes were using ctx.context.adapter directly with model: "verification", bypassing the internal adapter's secondary storage routing
  • When secondaryStorage is configured without verification.storeInDatabase: true, the verification model is excluded from the schema, causing Model "verification" not found in schema errors in these SSO routes
  • Switch to ctx.context.internalAdapter.createVerificationValue / findVerificationValue which properly route through secondary storage

Test plan

  • All 326 SSO tests passing
  • magic-link-secondary-storage.test.ts passing (6/6)
  • magic-link.test.ts passing (16/16)
  • internal-adapter.test.ts passing (33/33)
  • pnpm typecheck passing
  • pnpm lint passing

Closes #8348


🔄 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/8353 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/4/2026 **Status:** ✅ Merged **Merged:** 3/4/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/8348-verification-schema` --- ### 📝 Commits (1) - [`081c939`](https://github.com/better-auth/better-auth/commit/081c939c73e7731b3461caee726b5239a3a124b8) fix(sso): use internalAdapter for verification operations ### 📊 Changes **3 files changed** (+92 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `packages/sso/src/domain-verification.test.ts` (+73 -3) 📝 `packages/sso/src/routes/domain-verification.ts` (+14 -32) 📝 `packages/sso/src/routes/sso.ts` (+5 -10) </details> ### 📄 Description ## Summary - SSO domain-verification and provider registration routes were using `ctx.context.adapter` directly with `model: "verification"`, bypassing the internal adapter's secondary storage routing - When `secondaryStorage` is configured without `verification.storeInDatabase: true`, the verification model is excluded from the schema, causing `Model "verification" not found in schema` errors in these SSO routes - Switch to `ctx.context.internalAdapter.createVerificationValue` / `findVerificationValue` which properly route through secondary storage ## Test plan - [x] All 326 SSO tests passing - [x] `magic-link-secondary-storage.test.ts` passing (6/6) - [x] `magic-link.test.ts` passing (16/16) - [x] `internal-adapter.test.ts` passing (33/33) - [x] `pnpm typecheck` passing - [x] `pnpm lint` passing Closes #8348 --- <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 22:34:23 -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#24817