Google chrome extension 无法在具有identity.getAuthToken的chrome扩展chrome中获取令牌
我无法使用获取身份验证令牌Google chrome extension 无法在具有identity.getAuthToken的chrome扩展chrome中获取令牌,google-chrome-extension,oauth,Google Chrome Extension,Oauth,我无法使用获取身份验证令牌 chrome.identity.getAuthToken({interactive: true}, token => { ... } 我得到这个错误: Unchecked runtime.lastError: OAuth2 request failed: Connection failed (-2). 我为ChromeApp设置了OAuth 2.0客户端,并指定了扩展的应用程序id。同时设置一个同意页面。 我的清单如下所示: "permissi
chrome.identity.getAuthToken({interactive: true}, token => {
...
}
我得到这个错误:
Unchecked runtime.lastError: OAuth2 request failed: Connection failed (-2).
我为ChromeApp设置了OAuth 2.0客户端,并指定了扩展的应用程序id。同时设置一个同意页面。
我的清单如下所示:
"permissions": [
"storage",
"identity"
],
"key": "<my application key>",
"oauth2": {
"client_id": "<my client id>.apps.googleusercontent.com",
"scopes": [
"openid", "email", "profile"
]
}
“权限”:[
“存储”,
“身份”
],
“密钥”:“密钥”,
“oauth2”:{
“客户端id”:“.apps.googleusercontent.com”,
“范围”:[
“openid”、“电子邮件”、“个人资料”
]
}
如何修复或至少调试此问题?我也有此问题,我注意到我最初使用的不是Chrome,而是Microsoft Edge
确保您使用的是Chrome。我也遇到了这个问题,我注意到我最初没有使用Chrome,而是使用了Microsoft Edge
确保您使用的是Chrome。您必须使用正确的密码:您必须编写
https://www.googleapis.com/auth/userinfo.email
,用于example@IvánNokonoko感谢您的建议,但它也不起作用,同样的错误。您必须使用正确的:而不是电子邮件,你必须写https://www.googleapis.com/auth/userinfo.email
,用于example@IvánNokonoko感谢您的建议,但它也不起作用,同样的错误。