- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Chrome Identity API,在我的 Chrome 扩展程序上为用户提供 Google 身份验证。
我跟着谷歌的官方教程:link Chrome Identity API
chrome.identity.getAuthToken
chrome://chrome-signin/?source=5
{
"name": "My Extension",
"short_name": "Ex App",
"version": "0.1",
"description": "description",
"manifest_version": 2,
"icons": { "128": "ICONE.png", "48": "ICONE1.png" },
"permissions": ["contextMenus", "identity", "cookies", "http://*/*", "https://*/*", "<all_urls>", "unlimitedStorage"],
"browser_action": {
"default_title": "Title",
"default_icon": "imgIcone.png"
},
"oauth2": {
"client_id": "xxxxxxx",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"background": {
"scripts": ["background.js"]
},
"content_scripts" : [
{
"matches": ["*://*.google.com/*"],
"js": ["gadget/js/jquery.js","gadget/js/contactcard.js"],
"css": ["gadget/css/contactcard.css"],
"all_frames": true
}],
"content_security_policy": "script-src 'self' 'unsafe-eval' https://apis.google.com/; object-src 'self'",
"web_accessible_resources": ["img.png","gadget/css/contactcard.css","gadget/img/extension/crec.png"]
}
chrome.identity.getAuthToken({ 'interactive': true }, function(token) {
// Use the token.
console.log(token);
});
最佳答案
问题已解决!
应用 ID 我的 Chrome extension
与我的不匹配 应用 ID 在 Google Console Developpers
为了避免这种上传,您的扩展程序首先从 Chrome 复制 ID 并在 Google 控制台开发人员中设置它!
每次在 Google Chrome 中更改它时,您都必须在 Google 控制台中更新它
关于google-chrome-extension - chrome.identity.getAuthToken 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31141573/
我正在使用 getAuthToken() 获取 token ,然后登录 Google App Engine 应用程序。 它曾经有效,直到今天,我不知道为什么 getAuthToken() 返回 nul
我有几个关于 AccountManager 类的 getAuthToken() 方法的问题。 “authTokenType”可以取什么值?到目前为止,我只看到它取值“啊”。 getAuthToken(
我正在尝试获取 Google 帐户的授权 token ,因为我正在使用以下代码: AccountManager acoountManager = AccountManager.get( getCon
我正在使用 AbstractAccountAuthenticator 的自定义实现,并且我已经按照文档实现了 getAuthToken。我一直在关注本教程:http://blog.udinic.com
我正在 Android 中制作一个简单的 REST 客户端:我创建了一个负责 REST 调用的服务,但它需要用户名和密码才能运行。用户名和密码存储在常规帐户注册表中,所以我想做的是在服务中检索用户名和
一旦用户验证我的应用程序以查看和管理邮件,我的代码就可以工作。 或者看起来像这样: 然而,对于第一次(对于第一个请求),谷歌的对话框出现(上方)并要求用户进行身份验证,然后即使用户选择“确定”(即使“
我的应用程序使用客户管理器共享身份验证 token ,它在 4.0 早期运行良好。但是当我在我的 Nexus S (4.0.3) 中试用该应用程序时,每次我调用 getAuthToken 方法时都会发
在使用 Android 的 AccountManager 获取 Google 帐户的授权 token 时,我遇到了一个奇怪的行为。 应用启动时,第一次调用 getAuthToken 会返回一个包,其中
我通过扩展 AbstractAccountAuthenticator 创建了自己的 Android 帐户 validator 并实现 addAccount()和 getAuthToken() .其中的
当我调用 AccountManager.get(this).getAuthTokenByFeatures(Constants.ACCOUNT_TYPE, Constants.AUTHTOKEN_TYP
我在 Android 中有一个应用程序,我正在尝试使用 AccountManager 获取 AuthToken 并使用 Facebook 或 Twitter 进行操作。所以我得到了这个: Accoun
我的代码: Account[] accts = mgr.getAccountsByType("com.google"); Account acct = accts[0]; System.out.pri
我的印象是在使用 chrome.identity.getAuthToken 和 gapi.auth.authorize({immediate: true...}); token 将在后台刷新。 但它显
我已经扩展了 AbstractAccountAuthenticator 并覆盖了 getAuthToken。一切都适用于我的 getAuthToken,除非缓存的 authtoken 有效,在这种情况
在 JellyBean 设备上。 我正在关注 this请求 oauth2 token ,例如 AccountManager am = AccountManager.get(getActivity())
使用 Eclipse 创建了一个测试应用程序,以从我设备上的一个 Google 电子邮件帐户获取 authToken。 执行此操作会提示我允许访问对话框,我在其中按允许访问: accountManag
我正在使用 Chrome Identity API,在我的 Chrome 扩展程序上为用户提供 Google 身份验证。 我跟着谷歌的官方教程:link Chrome Identity API 我为
ChromeOS 版本 63.0.3239.140(官方版本)(64 位) 你好, 我在使用 https://developer.chrome.com/apps/identity#method-get
我为我想在具有不同签名的其他应用程序中使用的 Web 服务构建了一个 AccountAuthenticator。我想立即显示全屏访问请求对话框(这个:http://i.imgur.com/gcndGZ
我在一个 Multi-Tenancy 团队应用程序中工作,并想使用 SSO 向机器人添加一个选项卡。在我的开发环境中,这一切正常,我可以毫无问题地登录。当我将其部署到 QA 环境时,出现以下错误 AU
我是一名优秀的程序员,十分优秀!