Dịch vụ nhận dạng của Google đang di chuyển sang API FedCM. Làm theo hướng dẫn di chuyển để xem xét những thay đổi có thể xảy ra và tránh tác động tiêu cực đến việc người dùng đăng nhập vào trang web của bạn.
Theo mặc định, lời nhắc Một lần nhấn sẽ xuất hiện ở góc trên cùng bên phải của cửa sổ trình duyệt web trên máy tính. Khi sử dụng FedCM, trình duyệt sẽ kiểm soát hoàn toàn vị trí của lời nhắc. Do đó, bố cục tuỳ chỉnh không được hỗ trợ.
Nếu không, hãy hiển thị tính năng Một lần nhấn bên trong phần tử vùng chứa để thay đổi vị trí của lời nhắc.
Để làm như vậy, hãy chỉ định mã nhận dạng DOM của phần tử vùng chứa trong thuộc tính data-prompt_parent_id.
Ví dụ về mã sau đây sử dụng lại phần tử g_id_onload làm phần tử vùng chứa và hiển thị lời nhắc Một lần nhấn ở vị trí đã chỉ định:
[null,null,["Cập nhật lần gần đây nhất: 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."]]],[]]