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

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

Original Pull Request: https://github.com/better-auth/better-auth/pull/8720

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8720 **State:** closed **Merged:** Yes --- ## 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
GiteaMirror added the pull-request label 2026-04-13 10:31:01 -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#16418