บริการ Google Identity กำลังย้ายข้อมูลไปยัง FedCM API ทำตามคำแนะนำในการย้ายข้อมูลเพื่อตรวจสอบการเปลี่ยนแปลงที่อาจเกิดขึ้นและหลีกเลี่ยงผลกระทบในแง่ลบที่ผู้ใช้ลงชื่อเข้าใช้เว็บไซต์ของคุณ
ช่วงเวลาที่ข้าม: กรณีนี้เกิดขึ้นเมื่อข้อความแจ้งให้แตะครั้งเดียวถูกปิดด้วยการยกเลิกอัตโนมัติ การยกเลิกด้วยตนเอง หรือเมื่อ Google ออกข้อมูลเข้าสู่ระบบไม่ได้ เช่น เมื่อมีการออกจากระบบ Google ในเซสชันที่เลือก
ช่วงเวลาที่ปิด: เกิดขึ้นเมื่อ Google ดึงข้อมูลเข้าสู่ระบบได้สําเร็จ หรือผู้ใช้ต้องการหยุดขั้นตอนการดึงข้อมูลเข้าสู่ระบบ เช่น เมื่อผู้ใช้เริ่มป้อนชื่อผู้ใช้และรหัสผ่านในกล่องโต้ตอบการเข้าสู่ระบบ คุณสามารถเรียกใช้เมธอด google.accounts.id.cancel() เพื่อปิดข้อความแจ้งแบบแตะครั้งเดียวและทริกเกอร์ช่วงเวลาที่ปิด
ตัวอย่างโค้ดต่อไปนี้ใช้ช่วงเวลาที่ข้าม
<script>
function continueWithNextIdp(notification) {
if (notification.isNotDisplayed() || notification.isSkippedMoment()) {
// try Next provider if One Tap is not displayed or skipped
}
}
</script>
...
<div id="g_id_onload"
data-client_id="YOUR_GOOGLE_CLIENT_ID"
data-login_uri="https://your.domain/your_login_endpoint"
data-moment_callback="continueWithNextIdp"
</div>
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-11-21 UTC"],[[["Developers can customize the default login flow to better suit their application's needs."],["To determine whether to utilize additional identity providers, developers can monitor the prompt UI status using a callback function."],["The prompt UI status includes key moments like display, skipped, and dismissed, enabling developers to manage user login efficiently."],["When Google successfully retrieves credentials or the user stops the process (\"dismissed moment\"), avoid using other identity providers."],["The provided code example demonstrates how to handle the \"skipped moment\" and proceed with alternative login options."]]],[]]