Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google api google oauth预填充帐户电子邮件_Google Api_Google Oauth - Fatal编程技术网

Google api google oauth预填充帐户电子邮件

Google api google oauth预填充帐户电子邮件,google-api,google-oauth,Google Api,Google Oauth,在使用GoogleAPI的oauth服务时,如何预先填充帐户。它要求我输入电子邮件地址。我安装了其他扩展,已经为我选择了gmail帐户。这就是我启动它时的样子: var opts = { interactive: true, url: `https://accounts.google.com/o/oauth2/v2/auth?client_id=${clientId}&scope=${scopeParam}&redi

在使用GoogleAPI的oauth服务时,如何预先填充帐户。它要求我输入电子邮件地址。我安装了其他扩展,已经为我选择了gmail帐户。这就是我启动它时的样子:

        var opts = {
            interactive: true,
            url: `https://accounts.google.com/o/oauth2/v2/auth?client_id=${clientId}&scope=${scopeParam}&redirect_uri=${redirectUrl}&response_type=token`
        };

chrome.identity.launchWebAuthFlow(opts, authUrl => {...});

查看,
登录提示
是您要查找的身份验证URI参数。因此,您的
url
可能看起来像这样:

https://accounts.google.com/o/oauth2/v2/auth?client_id=${clientId}&scope=${scopeParam}&redirect\u uri=${redirectUrl}&response\u type=token&login\u提示=chris@gmail.com

请记住,谷歌不会预先填充虚假的gmail地址——你需要使用真实的地址