บริการ Google Identity กำลังย้ายข้อมูลไปยัง FedCM API ทำตามคำแนะนำในการย้ายข้อมูลเพื่อตรวจสอบการเปลี่ยนแปลงที่อาจเกิดขึ้นและหลีกเลี่ยงผลกระทบในแง่ลบที่ผู้ใช้ลงชื่อเข้าใช้เว็บไซต์ของคุณ
ในหน้า HTML ที่สร้างขึ้นแบบไดนามิก คุณสามารถใส่รหัส g_id_onload ได้เมื่อจำเป็นต้องเข้าสู่ระบบ และนำออกหลังจากที่สร้างเซสชันผู้ใช้แล้ว
อย่างไรก็ตาม หากต้องการสลับการแสดงผลแบบแตะครั้งเดียวสำหรับหน้า HTML แบบคงที่ คุณจะเปลี่ยนเนื้อหา HTML ไม่ได้
วิธีตั้งค่า One Tap ให้สลับสถานะการแสดงผลคือระบุคุกกี้ที่มีแอตทริบิวต์ data-skip_prompt_cookie หากไม่ได้ตั้งค่าคุกกี้หรือค่าว่าง ไลบรารีไคลเอ็นต์จะทํางานตามปกติ มิฉะนั้น ไลบรารีไคลเอ็นต์จะหยุดทำงานและ One Tap จะไม่แสดง
[null,null,["อัปเดตล่าสุด 2024-11-23 UTC"],[[["Customize the default login flow to meet specific requirements using various options."],["For dynamic HTML pages, control One Tap display by including or removing the `g_id_onload` ID based on user session status."],["For static HTML pages, toggle One Tap display by setting a cookie specified with the `data-skip_prompt_cookie` attribute; an empty or missing cookie displays One Tap, otherwise, it's hidden."],["Use the provided code snippet to define the cookie name controlling the One Tap prompt for your static HTML pages, replacing placeholders with your specific values."]]],[]]