[PR #7284] [MERGED] fix(two-factor): add missing POST endpoints to client pathMethods #15443

Closed
opened 2026-04-13 10:02:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7284
Author: @theonlypal
Created: 1/12/2026
Status: Merged
Merged: 1/12/2026
Merged by: @himself65

Base: canaryHead: fix/two-factor-client-path-methods


📝 Commits (1)

  • c3cd0f9 fix(two-factor): add missing POST endpoints to client pathMethods

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/two-factor/client.ts (+4 -0)

📄 Description

Closes #7277

The two-factor client plugin was missing several POST endpoints in its pathMethods configuration, causing the client to default to GET requests and receive 404 errors.

Added the following endpoints:

  • /two-factor/get-totp-uri
  • /two-factor/verify-totp
  • /two-factor/verify-otp
  • /two-factor/verify-backup-code

Summary by cubic

Fixes the two-factor client so TOTP/OTP actions use POST instead of defaulting to GET, preventing 404s and aligning the client with the server API.

  • Bug Fixes
    • Added POST mappings for: /two-factor/get-totp-uri, /two-factor/verify-totp, /two-factor/verify-otp, /two-factor/verify-backup-code.

Written for commit c3cd0f9e12. 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/7284 **Author:** [@theonlypal](https://github.com/theonlypal) **Created:** 1/12/2026 **Status:** ✅ Merged **Merged:** 1/12/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/two-factor-client-path-methods` --- ### 📝 Commits (1) - [`c3cd0f9`](https://github.com/better-auth/better-auth/commit/c3cd0f9e1280b8f60296328eb68abd60770ce479) fix(two-factor): add missing POST endpoints to client pathMethods ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/two-factor/client.ts` (+4 -0) </details> ### 📄 Description Closes #7277 The two-factor client plugin was missing several POST endpoints in its `pathMethods` configuration, causing the client to default to GET requests and receive 404 errors. Added the following endpoints: - `/two-factor/get-totp-uri` - `/two-factor/verify-totp` - `/two-factor/verify-otp` - `/two-factor/verify-backup-code` <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the two-factor client so TOTP/OTP actions use POST instead of defaulting to GET, preventing 404s and aligning the client with the server API. - **Bug Fixes** - Added POST mappings for: /two-factor/get-totp-uri, /two-factor/verify-totp, /two-factor/verify-otp, /two-factor/verify-backup-code. <sup>Written for commit c3cd0f9e1280b8f60296328eb68abd60770ce479. 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-04-13 10:02:02 -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#15443