Przenosimy usługi tożsamości Google do interfejsów API FedCM. Postępuj zgodnie z przewodnikiem po migracji, aby sprawdzić potencjalne zmiany i uniknąć negatywnego wpływu na logowanie się użytkowników w Twojej witrynie.
Domyślnie prompt „Jedno kliknięcie” wyświetla się w prawym górnym rogu okien przeglądarki na komputerze. Gdy jest używany system FedCM, przeglądarka w pełni kontroluje lokalizację promptu. Dlatego układy niestandardowe nie są obsługiwane.
W przeciwnym razie wyświetlaj przycisk One Tap wewnątrz elementu kontenera, aby zmienić pozycję promptu.
Aby to zrobić, w atributecie data-prompt_parent_id podaj identyfikator DOM elementu kontenera.
Ten przykład kodu używa elementu g_id_onload jako elementu kontenera i wyświetla prompt One Tap w określonej pozycji:
[null,null,["Ostatnia aktualizacja: 2024-11-08 UTC."],[[["With the migration of One Tap to the FedCM API, browsers will control the prompt's size and position, eliminating support for custom positions."],["Developers are advised against customizing the position for new One Tap integrations and to review the migration guide for existing integrations to ensure compatibility."],["Customizing the One Tap login flow is possible, including positioning the prompt within a container element by utilizing the `data-prompt_parent_id` attribute, but avoid obscuring any prompt content to comply with Google's policies."],["Remember that the `data-prompt_parent_id` attribute is disregarded on mobile web browsers, limiting customization in those environments."],["Hiding or manipulating the One Tap prompt's content to misrepresent its origin from a Google iframe can lead to severe consequences, including project or account suspension."]]],[]]