Google Identity Services در حال انتقال به APIهای FedCM است. راهنمای مهاجرت را دنبال کنید تا تغییرات احتمالی را بررسی کنید و از تأثیرات منفی ورود کاربر به وب سایت خود جلوگیری کنید.
در صورت ترجیح، میتوانید فقط از کد جاوا اسکریپت برای راهاندازی درخواست One Tap یا نمایش دکمه ورود به سیستم با Google استفاده کنید.
برای پیکربندی درخواست One Tap در جاوا اسکریپت، ابتدا باید متد initialize() را فراخوانی کنید. سپس، متد prompt() را فراخوانی کنید تا UI prompt نمایش داده شود. قطعه کد زیر را ببینید:
تاریخ آخرین بهروزرسانی 2024-11-23 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-23 بهوقت ساعت هماهنگ جهانی."],[[["Developers can customize the default login flow using JavaScript to better suit their specific needs."],["You can trigger the One Tap prompt or display the Sign in with Google button programmatically using JavaScript."],["The `initialize()` and `prompt()` methods are key to configuring and displaying the One Tap prompt in your web application."],["To receive updates on the prompt's status, such as if it's not displayed or skipped by the user, a callback function can be provided to the `prompt()` method."],["JavaScript allows for rendering both the One Tap prompt and the Sign in with Google button, offering users flexible login options."]]],[]]