Heya, back to my favourite topics namely OAuth .
I have previously discussed about common OAuth 2 Implementation Vulnerabilities but now it is time (maybe) to list those and order them based on their criticality.
The client MUST NOT use the authorization code more than once. If an authorization code is used more than once, the authorization server MUST deny the request and SHOULD revoke (when possible) all tokens previously issued based on that authorization code.
It turned out that even Facebook and Google did it wrong... :)
To all OAuth Providers be sure to follow section 4.1.3 of the spec in particular
...if the "redirect_uri" parameter was included in the initial authorization request as described in Section 4.1.1, and if included ensure that their values are identical.
Should you fail to do it, this in combination with Lassie Come Home below is game over (even for implementer that support only the Authorization Code Grant flow).
As per any other website part is important to not forget Cross Site Request Forgery aka CSRF protection in your OAuth provider impelemtation. Some examples are:
If you are an OAuth client that use OAuth for authentication (do NOT). If you absolutely have to, you'd better read User Authentication with OAuth 2.0 . Specially if you are using the OAuth Implicit Grant flow (aka Client side).
More about the topic in here and here
....and the winner is _'Lassie Come Home'. _Well this is hell of a danger.
There are way too many example of provider vulnerable to this attack. Just listing few here: