[GH-ISSUE #182] State not being checked after response #111

Closed
opened 2026-03-03 16:45:46 +03:00 by kerem · 2 comments
Owner

Originally created by @mats-claassen on GitHub (Feb 11, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/182

I am trying to connect to Linkedin. After requesting authorization they return a code and a state. The code is used to get the access token but it is not being checked (or at least I did not find it) if the state matches the one send in the first request.

Originally created by @mats-claassen on GitHub (Feb 11, 2016). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/182 I am trying to connect to Linkedin. After requesting authorization they return a `code` and a `state`. The `code` is used to get the access token but it is not being checked (or at least I did not find it) if the `state` matches the one send in the first request.
kerem closed this issue 2026-03-03 16:45:46 +03:00
Author
Owner

@phimage commented on GitHub (Feb 21, 2016):

I think you are right (and must be check to prevent CSRF)
http://tools.ietf.org/html/draft-ietf-oauth-v2-26#section-10.12

<!-- gh-comment-id:186895157 --> @phimage commented on GitHub (Feb 21, 2016): I think you are right (and must be check to prevent CSRF) http://tools.ietf.org/html/draft-ietf-oauth-v2-26#section-10.12
Author
Owner

@phimage commented on GitHub (Feb 21, 2016):

added a check about state value when receiving a code
don't know if all case is supported : i read some info here http://spring.io/blog/2011/11/30/cross-site-request-forgery-and-oauth2

add a var allowMissingStateCheck to remove this check in case of some problem in provider oauth protocol

<!-- gh-comment-id:186908413 --> @phimage commented on GitHub (Feb 21, 2016): added a check about state value when receiving a `code` don't know if all case is supported : i read some info here http://spring.io/blog/2011/11/30/cross-site-request-forgery-and-oauth2 add a var `allowMissingStateCheck` to remove this check in case of some problem in provider oauth protocol
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#111
No description provided.