Linkedin oauth2 api,授权不return "state"
Linkedin oauth2 api, authorization do not return "state"
我正在通过 state=;xyz
授权请求。我可以在允许屏幕上的浏览器 url 中看到相同的内容。单击 "Allow" 按钮后,我获得了访问令牌,即带有重定向 uri 的代码,但 Linkedin 在 redirect_uri.
中没有 return state
有人可以帮我解决这个问题吗?
提前致谢。
state
参数不是必需的,或者必须根据授权和相关流的一部分出现在响应中。我不得不冒昧地说 LinkedIn 没有编写违反 OAuth 2.0 实施的规范,所以也许你是 using/expecting state
而你不应该或正在正确使用它放错地方了?
Authorization Code Grant (https://www.rfc-editor.org/rfc/rfc6749#section-4.1) state
不会出现在 access_token
响应中,仅出现在授权 code
响应中(如果您已发送)一个请求 code
.
隐式授予 (https://www.rfc-editor.org/rfc/rfc6749#section-4.2) state
将与 access_token
一起返回,如果您在令牌请求中发送了一个。
资源所有者密码凭证授予(https://www.rfc-editor.org/rfc/rfc6749#section-4.3)state
根本没有使用。
客户端凭据授予 (https://www.rfc-editor.org/rfc/rfc6749#section-4.4) state
根本没有使用。
如果您发现 LinkedIn 违反了规范,那么值得让他们知道!
通过反复试验解决了这个问题。这个错误对我来说很愚蠢。
我超过了 state=;xyz
,但 linkedin 期望 state=%3Bxyz
。
Linkedin 只是忽略 ;
和后面的字符,因为我在 ;
之前没有任何内容,linkedin 将其视为空值并且没有返回状态。傻在我这边。
@starlight54谢谢你花时间陪我。
我正在通过 state=;xyz
授权请求。我可以在允许屏幕上的浏览器 url 中看到相同的内容。单击 "Allow" 按钮后,我获得了访问令牌,即带有重定向 uri 的代码,但 Linkedin 在 redirect_uri.
state
有人可以帮我解决这个问题吗?
提前致谢。
state
参数不是必需的,或者必须根据授权和相关流的一部分出现在响应中。我不得不冒昧地说 LinkedIn 没有编写违反 OAuth 2.0 实施的规范,所以也许你是 using/expecting state
而你不应该或正在正确使用它放错地方了?
Authorization Code Grant (https://www.rfc-editor.org/rfc/rfc6749#section-4.1)
state
不会出现在access_token
响应中,仅出现在授权code
响应中(如果您已发送)一个请求code
.隐式授予 (https://www.rfc-editor.org/rfc/rfc6749#section-4.2)
state
将与access_token
一起返回,如果您在令牌请求中发送了一个。资源所有者密码凭证授予(https://www.rfc-editor.org/rfc/rfc6749#section-4.3)
state
根本没有使用。客户端凭据授予 (https://www.rfc-editor.org/rfc/rfc6749#section-4.4)
state
根本没有使用。
如果您发现 LinkedIn 违反了规范,那么值得让他们知道!
通过反复试验解决了这个问题。这个错误对我来说很愚蠢。
我超过了 state=;xyz
,但 linkedin 期望 state=%3Bxyz
。
Linkedin 只是忽略 ;
和后面的字符,因为我在 ;
之前没有任何内容,linkedin 将其视为空值并且没有返回状态。傻在我这边。
@starlight54谢谢你花时间陪我。