Apps Marketplace SSO

时间:2014-05-07 08:04:46

标签: single-sign-on google-apps-marketplace

我们有一个Google Apps Marketplace应用程序(也可以在Chrome网上应用店中作为消费者应用程序使用)。

我们遇到以下SSO问题:

1)我们使用以下OAuth2范围:

openid
profile 
email 
https://www.googleapis.com/auth/drive.install
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly

重定向到

https://accounts.google.com/o/oauth2/auth

3)我无法进入范围

openid
profile 
email 

进入Google Apps Marketplace SDK控制台。我用过:

https://www.googleapis.com/auth/userinfo.email  
https://www.googleapis.com/auth/userinfo.profile

代替(不推荐使用)。

我们还要求

https://www.googleapis.com/auth/cloudprint

那里(因为我们以后可能需要它)

4)我可以将应用程序安装为域管理员并正常使用(无需任何授权对话框)。

5)当我尝试以域用户身份登录时,会出现授权对话框。我们如何防止这种情况?

6)当用户想要将云打印机连接到我们的应用程序时,我们稍后会请求所需的范围(我们需要离线使用(即我们需要刷新令牌),因为它用于通过API接口)。在这种情况下,甚至要求域管理员获得许可。我们如何防止它?

2 个答案:

答案 0 :(得分:2)

除了默认范围

之外,您还需要在“Google Apps Marketplace SDK”控制台中添加以下范围
https://www.googleapis.com/auth/plus.me

单击“TEST INSTALL FLOW”(如果尚未安装)

然后转到admin.google.com搜索您的应用程序并将其打开。然后在数据访问下提供grant。

现在您可以使用任何域用户登录该应用程序,并且不会要求同意。

希望这有帮助。

答案 1 :(得分:1)

我认为域管理员安装的应用程序尚未自动批准离线访问。

请参阅Google Apps Marketplace SDK + Domain-wide OAuth 2 SSO