1

Google マイビジネス API を使用してプラットフォームを作成しようとしています。Google ワンタップ サインインを使用してユーザーの同意を得ていますが、このコードを使用している場合、別の認証画面をクリックすると別の認証画面がポップアップします。タップサインイン こちらが画像例 ワンタップサインイン

1 回のタップでサインインした後の 2 番目の画面 2 番目の画面を削除して、Google マイビジネスの同意に進みたい

 <script>
      window.onload = function () {
        google.accounts.id.initialize({
          client_id:
            "8.apps.googleusercontent.com",
          callback: handleCredentialResponse,
        });
        google.accounts.id.prompt((notification) => {
          if (notification.isNotDisplayed() || notification.isSkippedMoment()) {
            console.log("opted out");
          }
        });
        function handleCredentialResponse(response) {
          // window.location = "https://github.com/";
          const config = {
            response_type: "permission",
            scope: "https://www.googleapis.com/auth/plus.business.manage",
            client_id:
              "8.apps.googleusercontent.com",
          };
          gapi.auth2.authorize(config, function (response) {
            
          });
        }
      };
    </script>
4

1 に答える 1