スキップされた瞬間: 自動キャンセルまたは手動キャンセルによってワンタップ プロンプトが閉じられた場合、または Google が認証情報を発行できなかった場合(選択したセッションで Google からログアウトした場合など)に発生します。
この場合は、次の ID プロバイダ(存在する場合)に進むことをおすすめします。
閉じたモーメント: 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."]]],[]]