M
M
matperez2015-09-05 13:56:38
PHP
matperez, 2015-09-05 13:56:38

Why can't I log in to a contact?

I am writing a script for authorizing applications in a contact based on https://github.com/speechkey/VKAppAuth. I stumbled at the authorization stage. In theory, I should redirect to a link to allow access to the application, but instead I get a link to re-authorize.
Here is the code itself: https://github.com/matperez/vk-app-auth/blob/maste... .
Before sending $authRequest, I receive from the authorization form a link " https://login.vk.com/?act=login&soft=1&utf8=1 " and a set of parameters:

[
            '_origin' => 'https://oauth.vk.com',
            'ip_h' => '8e29e63c00c0ca4f20',
            'lg_h' => '1b2c06197b914831c8',
            'to' => 'aHR0cHM6Ly9vYXV0aC52ay5jb20vYXV0aG9yaXplP2NsaWVudF9pZD0zNzEzNzc0JnJlZGlyZWN0X3VyaT1odHRwcyUzQSUyRiUyRm9hdXRoLnZrLmNvbSUyRmJsYW5rLmh0bWwmcmVzcG9uc2VfdHlwZT10b2tlbiZzY29wZT04JnY9JnN0YXRlPSZkaXNwbGF5PXdhcA--',
        ]

I add the username and password there, and send a post request to the server. The server should redirect to the page with permission. Instead, I get a re-authorization link. What am I not doing wrong? Maybe the point is that some necessary cookies are set on the authorization page through Javascript?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-09-06
@matperez

Understood. By mistake did not store cookies in the request. The process itself is correct and working.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question