出现冗余SSO权限提示问题;Apps Marketplace安装的工作流



在过去的一个月里,我一直在与谷歌支持代表合作,他负责验证谷歌应用市场提交的SSO工作流/集成。除了一个神秘的问题外,我们已经成功地设置、配置和测试了所有内容。我的谷歌代表建议我在这里发布我们的问题,因为他和我都不确定如何解决

当您安装我们的应用程序时(https://chrome.google.com/webstore/detail/floruit-labs-pond/bhalfbanckpdhnkjnknlhcoiohcigocm?hl=en),工作流会多次提示您允许权限。当然,这对于在市场上发布来说是一个破坏交易的因素。

冒着过度共享的风险,我附上了背景材料作为背景:我们安装工作流程的截图

此外,下面复制的是我们登录页面中嵌入的代码片段,它添加了谷歌登录按钮功能:

<!---include Google Apps SSO scripts --->
<meta name="google-signin-client_id" content="743379733841-bt8rpjio0qs44kei4vlk5av888fbp0fs.apps.googleusercontent.com">
 <script src="https://apis.google.com/js/platform.js" async defer>
<!---include Google Apps SSO button --->
									 <div class="g-signin2" data-theme="dark" data-width="250" data-height="52" data-longtitle="true" align="left" style="margin-top:50px;"></div>
    <script>
      function onSignIn(googleUser) {
        // Useful data for your client-side scripts:
        var profile = googleUser.getBasicProfile();
        console.log("ID: " + profile.getId()); // Don't send this directly to your server!
        console.log("Name: " + profile.getName());
        console.log("Image URL: " + profile.getImageUrl());
        console.log("Email: " + profile.getEmail());
        // The ID token you need to pass to your backend:
        var id_token = googleUser.getAuthResponse().id_token;
        console.log("ID Token: " + id_token);
      };
        function renderButton() {
      gapi.signin2.render('my-signin2', {
        'scope': 'profile email https://www.googleapis.com/auth/drive',
        'longtitle': true,
        'theme': 'dark',
        'onsuccess': onSuccess,
        'onfailure': onFailure
      });
    }
    </script>

如果登录/OAuth2对话框包含用户或管理员尚未批准的其他作用域,则该对话框将不会自动批准。谷歌登录按钮似乎总是包括"openid"作用域,这不是您的应用程序配置的作用域之一。请将该范围添加到您的应用程序市场配置中,它应该可以解决此问题。

最新更新