强制谷歌显示帐户选择器和同意屏幕

use*_*271 10 google-api google-oauth omnicontacts-gem

我可以单独使用prompt=consentprompt=select_account单独使用,但Google似乎不允许我将它们组合使用.我尝试了强制谷歌帐户选择器prompt=consent+select_account的答案中的建议,但失败了错误:"无效提示:同意+ select_account".

该文档(https://developers.google.com/accounts/docs/OAuth2Login)显示"以空格分隔的列表",因此我尝试consent select_account但失败的原因是:"在此服务器上找不到请求的网址."

我也试过结合prompt=select_accountapproval_prompt=force,但谷歌不喜欢,要么.

其他人在结合同意屏幕和帐户选择器方面运气好吗?

更新:

这是我的JavaScript方法,用于创建从gmail获取联系人的URL

$scope.importGmailContacts = function() {
    provider = 'gmail';
    $scope.importing_from_gmail = true;
    window.open(protocol + "://" + host + ":" + port + "/contacts/gmail", "_blank",
     "toolbar=yes, scrollbars=yes, resizable=yes, top=0, left=0, width=600, height=600, prompt='select_account+consent', approval_prompt=force");
}
Run Code Online (Sandbox Code Playgroud)

我尝试过设置prompt,approval_prompt无论是集体还是单独设置,但似乎无法正常工作.请参阅此问题.

Bre*_*t C 1

我刚刚尝试过这个,它在空格分隔时确实有效:

options[:prompt] = '选择帐户同意'