[PR #7482] [MERGED] feat(one-tap): add button mode for Google sign-in #24246

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7482
Author: @himself65
Created: 1/20/2026
Status: Merged
Merged: 1/23/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/19/button


📝 Commits (4)

  • 84d016d feat(one-tap): add button mode for Google sign-in with customizable options
  • 3db6b6e docs(one-tap): use Tabs component for button mode examples
  • 43376a6 docs(one-tap): change tab label from 'CSS Selector' to 'Vanilla JS'
  • 55a8fe8 type fix

📊 Changes

2 files changed (+217 additions, -0 deletions)

View changed files

📝 docs/content/docs/plugins/one-tap.mdx (+68 -0)
📝 packages/better-auth/src/plugins/one-tap/client.ts (+149 -0)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/7458


Summary by cubic

Adds a button mode to Google One Tap so you can render a “Sign in with Google” button instead of the automatic prompt. Prompt mode remains the default, and docs now include examples.

  • New Features
    • Render a button via oneTap({ button: { container, config } }) using a CSS selector or HTMLElement.
    • Supports Google button options: type, theme, size, text, shape, logo_alignment, width, locale, click_listener, state.
    • Handles the credential callback and redirects like prompt mode; supports callbackURL.
    • Updated docs with prompt vs. button usage, React ref example, and option reference.

Written for commit 55a8fe8d34. 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/7482 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/23/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/19/button` --- ### 📝 Commits (4) - [`84d016d`](https://github.com/better-auth/better-auth/commit/84d016defdcea2dd8f594240f7f9b5f114effa42) feat(one-tap): add button mode for Google sign-in with customizable options - [`3db6b6e`](https://github.com/better-auth/better-auth/commit/3db6b6e7ecbf7b79592c80249cd6b4b2e6ac0480) docs(one-tap): use Tabs component for button mode examples - [`43376a6`](https://github.com/better-auth/better-auth/commit/43376a65c856c74342d8e32da236536afc1eec82) docs(one-tap): change tab label from 'CSS Selector' to 'Vanilla JS' - [`55a8fe8`](https://github.com/better-auth/better-auth/commit/55a8fe8d345665a5b7b627f8ac6a4f55faf7770f) type fix ### 📊 Changes **2 files changed** (+217 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/one-tap.mdx` (+68 -0) 📝 `packages/better-auth/src/plugins/one-tap/client.ts` (+149 -0) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/7458 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a button mode to Google One Tap so you can render a “Sign in with Google” button instead of the automatic prompt. Prompt mode remains the default, and docs now include examples. - **New Features** - Render a button via oneTap({ button: { container, config } }) using a CSS selector or HTMLElement. - Supports Google button options: type, theme, size, text, shape, logo_alignment, width, locale, click_listener, state. - Handles the credential callback and redirects like prompt mode; supports callbackURL. - Updated docs with prompt vs. button usage, React ref example, and option reference. <sup>Written for commit 55a8fe8d345665a5b7b627f8ac6a4f55faf7770f. 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:15:25 -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#24246