Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
vk oauth audit

really, no single mention about 'state' attack is possible

redirect_uri should be required to obtain access_token.

Для получения access_token необходимо выполнить запрос с Вашего сервера на URL с передачей параметра code и секретных данных приложения: client_id и client_secret. Секретный ключ приложения client_secret может быть получен в разделе редактирования приложения и никогда не должен содержаться в коде клиентского приложения. С подробным списком параметров можно ознакомиться на странице описания получения access_token.

'code' leaks - when path is sent as redirect_uri, attacker owns code and easily uses it.

   In order to prevent such an attack, the authorization server MUST
   ensure that the redirection URI used to obtain the authorization code
   is identical to the redirection URI provided when exchanging the
   authorization code for an access token.  The authorization server
   MUST require public clients and SHOULD require confidential clients
   to register their redirection URIs.  If a redirection URI is provided
   in the request, the authorization server MUST validate it against the
   registered value.

callback must be strictly sanitized it's regular mistake for response_type=token applications, they don't sanitize document.hash and pass it in <script src>. XSS is possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment