[PR #9202] [CLOSED] docs(2fa): add OAuth provider integration example for 2FA flow #25399

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/9202
Author: @Jackinatox
Created: 4/15/2026
Status: Closed

Base: mainHead: patch-1


📝 Commits (3)

  • bd9752f OAuth 2fa clarification for 1.6.3
  • b06f1de docs(2fa): clarify callback URL for 2FA verification in OAuth integration
  • 725a886 fix: standardize quotation marks in 2FA sign-in example

📊 Changes

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

View changed files

📝 docs/content/docs/plugins/2fa.mdx (+15 -0)

📄 Description

I added a simple code example to show how to use 2fa with OAuth. since 1.6.3 all session creating endpoints enforce 2fa.


Summary by cubic

Add a 2FA-with-OAuth docs example for 1.6.3, which enforces 2FA on all session-creating endpoints. Clarifies setting Better Auth’s callbackURL to /verify-2fa in authClient.signIn.social (not the provider callback), verifies with authClient.twoFactor.verifyTotp, and standardizes quotes in the snippet.

Written for commit 725a886f14. 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/9202 **Author:** [@Jackinatox](https://github.com/Jackinatox) **Created:** 4/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (3) - [`bd9752f`](https://github.com/better-auth/better-auth/commit/bd9752ff93e3bc9beeb3c4e2d465b82c98224307) OAuth 2fa clarification for 1.6.3 - [`b06f1de`](https://github.com/better-auth/better-auth/commit/b06f1de1fba174992f42f41252eb8dde518aa6fb) docs(2fa): clarify callback URL for 2FA verification in OAuth integration - [`725a886`](https://github.com/better-auth/better-auth/commit/725a886f14215bb1781874dc03083ab9ca43fd7b) fix: standardize quotation marks in 2FA sign-in example ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/2fa.mdx` (+15 -0) </details> ### 📄 Description I added a simple code example to show how to use 2fa with OAuth. since 1.6.3 all session creating endpoints enforce 2fa. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add a 2FA-with-OAuth docs example for 1.6.3, which enforces 2FA on all session-creating endpoints. Clarifies setting Better Auth’s `callbackURL` to `/verify-2fa` in `authClient.signIn.social` (not the provider callback), verifies with `authClient.twoFactor.verifyTotp`, and standardizes quotes in the snippet. <sup>Written for commit 725a886f14215bb1781874dc03083ab9ca43fd7b. 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-15 22:52:13 -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#25399