[PR #8720] [MERGED] fix(one-tap): opt into FedCM to suppress Google GSI deprecation warnings #25072

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

📋 Pull Request Information

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

Base: canaryHead: fix/one-tap-fedcm-warnings


📝 Commits (1)

  • d3a92f6 fix(one-tap): opt into FedCM to suppress Google GSI deprecation warnings

📊 Changes

1 file changed (+11 additions, -13 deletions)

View changed files

📝 packages/better-auth/src/plugins/one-tap/client.ts (+11 -13)

📄 Description

Summary

  • Pass use_fedcm_for_prompt: true to google.accounts.id.initialize() to opt into FedCM, suppressing the GSI_LOGGER deprecation warnings about the upcoming FedCM migration
  • The behavior is controlled by the existing promptOptions.fedCM option (defaults to true), so users who set fedCM: false will not be opted in
  • Use optional chaining (?.()) for prompt notification methods (isDismissedMoment, isSkippedMoment, isNotDisplayed) since some are deprecated under FedCM and may not be available

Closes #8626

Test plan

  • Test Google One Tap with FedCM enabled (default) — verify no GSI_LOGGER warnings appear
  • Test Google One Tap with fedCM: false — verify the old behavior is preserved
  • Test button mode initialization also passes use_fedcm_for_prompt
  • Verify prompt dismiss/skip handling still works correctly under FedCM

🔄 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/8720 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/20/2026 **Status:** ✅ Merged **Merged:** 3/21/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/one-tap-fedcm-warnings` --- ### 📝 Commits (1) - [`d3a92f6`](https://github.com/better-auth/better-auth/commit/d3a92f68cd2fc57da3a4bc3c76c0fb0255d6ac83) fix(one-tap): opt into FedCM to suppress Google GSI deprecation warnings ### 📊 Changes **1 file changed** (+11 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/one-tap/client.ts` (+11 -13) </details> ### 📄 Description ## Summary - Pass `use_fedcm_for_prompt: true` to `google.accounts.id.initialize()` to opt into FedCM, suppressing the GSI_LOGGER deprecation warnings about the upcoming FedCM migration - The behavior is controlled by the existing `promptOptions.fedCM` option (defaults to `true`), so users who set `fedCM: false` will not be opted in - Use optional chaining (`?.()`) for prompt notification methods (`isDismissedMoment`, `isSkippedMoment`, `isNotDisplayed`) since some are deprecated under FedCM and may not be available Closes #8626 ## Test plan - [x] Test Google One Tap with FedCM enabled (default) — verify no GSI_LOGGER warnings appear - [x] Test Google One Tap with `fedCM: false` — verify the old behavior is preserved - [x] Test button mode initialization also passes `use_fedcm_for_prompt` - [x] Verify prompt dismiss/skip handling still works correctly under FedCM --- <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:42:54 -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#25072