- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试使用 oauth1 访问 token 获取新的 oauth2 刷新 token ,但它不断返回“invalid_token”错误。我已经检查过并且访问 token 工作正常。我还在 oauth2 playground 中测试了相同的 creds/params,结果是一样的。感谢任何帮助...
这是 curl 的详细输出:
> POST /o/oauth2/token HTTP/1.1
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth oauth_nonce="cb7407355fe20f509cb6bf901eae2d24", oauth_timestamp="1389169471", oauth_consumer_key="***", oauth_token="1%2FFVy....", oauth_signature_method="HMAC-SHA1", oauth_signature="0YL1hH5R571nOH1byeHxQlg%2Fa6g%3D"
Content-Length: 444
* upload completely sent off: 444 out of 444 bytes
< HTTP/1.1 400 Bad Request
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Date: Wed, 08 Jan 2014 08:24:31 GMT
< Content-Type: application/json
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
* Server GSE is not blacklisted
< Server: GSE
< Alternate-Protocol: 443:quic
< Transfer-Encoding: chunked
<
* Connection #0 to host accounts.google.com left intact
string(415) "HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Wed, 08 Jan 2014 08:24:31 GMT
Content-Type: application/json
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic
Transfer-Encoding: chunked
{
"error" : "invalid_token"
}"
最佳答案
您能检查一下您是否将 client_secret 放入 POST 正文中的 {} 中吗?
grant_type=urn:ietf:params:oauth:grant-type:migration:oauth1&client_id=xxxxxxx.apps.googleusercontent.com&client_secret={xxxxxxx}
当您生成 oauth_signature 时,您还需要将 {} 放在 client_secret 值周围
关于google-oauth - 谷歌 oauth1 到 oauth2 迁移 invalid_token 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20990801/
我们正在构建一个具有 SPA 前端和 API 后端的应用程序。 我们使用 MSAL 身份验证库,前端和后端在 Azure AD 中注册为应用程序。 我们收到 HTTP 401 错误。 为了尝试调试该问
我们正在构建一个具有 SPA 前端和 API 后端的应用程序。 我们使用 MSAL 身份验证库,前端和后端在 Azure AD 中注册为应用程序。 我们收到 HTTP 401 错误。 为了尝试调试该问
我正在使用java-apns库来发送推送通知消息。我将 token_id 发送到 APNS 服务器并收到响应 INVALID_TOKEN。所以我的问题是 APNS 服务器使用什么算法来响应?我认为最好
我在尝试使用通过 Flask-restful 和 firebase-token-generator-python 库生成的自定义 JWT token 通过 Google 进行身份验证时遇到此错误。简而
我有一个与 .Net Core 2.2 API 后端连接的 Angular 7 应用程序。这是与 Azure Active Directory 的接口(interface)。 在 Angular 7
我正在尝试使用 Firebase 服务器 SDK 来监控特定路径上的值。我关注了documentation然而过了一段时间后,我开始看到如下日志错误: [WARN] PersistentConnect
我需要获取 google+ signIn tokenId。 这是我的代码: var mGSO = GoogleSignInOptions.Builder(GoogleSignInOptions.DEF
我有一个简单的 web api 项目,它看起来像这样: [Authorize] [Route("Get")] public ActionResult SayHello(
有人可以帮我解决这个问题吗?我正在使用 Postman 测试 API 我正在学习有关 asp.net core 的教程。 我现在正在处理它的身份验证部分。 我真的不明白错误的原因是什么。 在教程中,它
我有一个从 azure 请求 token 的角度应用程序。登录进行得很顺利,我得到了一个 token 。此 token 现在从 angular 应用程序发送到网络核心 webapi 应用程序。 Net
我正在使用 keycloak 来保护我的休息服务,并且我能够获取 token ,但是当我使用此 token 来获取我的休息服务响应时,出现以下错误: HTTP/1.1 401 Unauthorized
在 https://outlook.office.com/api/v2.0/me/messages 上执行 GET 时,出现奇怪的 invalid_token 错误 即使我提供的 access_tok
我一直在尝试使用 oauth1 访问 token 获取新的 oauth2 刷新 token ,但它不断返回“invalid_token”错误。我已经检查过并且访问 token 工作正常。我还在 oau
我正在尝试从用户的 Facebook 收件箱中读取消息,但我遇到了一个拒绝访问的错误。这是我的代码: ACAccountStore *accountStore = [[ACAccountStore a
我第一次尝试使用 Keycloak,并使用 Keycoak 作为 oauth2_proxy ( https://github.com/oauth2-proxy/oauth2-proxy/blob/v5
请帮忙,我正在使用 ionic 前端构建 .NET Core API。我想使用 ASPNET Core Identity,所以我或多或少遵循了这个示例 https://identityserver4.
Postman headers我正在使用 key 生成访问 token ,我将使用该 token 对我调用的 API 进行身份验证。问题是我收到错误: 状态代码为:401,预期:200WWW-Auth
将 firebase 与 google 一起用作 firebase 身份验证的客户端。从 firebase 成功生成 token 后,我尝试显示来自另一个 firebase 数据库的一组数据。当我试图
第一次使用 Google+ API。我有一个带有 Web 和 Android 客户端的应用程序,该客户端使用 G+ 进行身份验证。 Web 客户端运行良好。我在 Google API 控制台中设置了一
目标 我正在尝试使用 Keycloak 和库在 Symfony 6 中设置 OAuth2 knpuniversity/oauth2-client-bundle和 stevenmaguire/oauth
我是一名优秀的程序员,十分优秀!