Answer the question
In order to leave comments, you need to log in
How to implement server authorization of a site in VKontakte without a dialog box?
The task is as follows: you need to make a page on the site, which will later be executed by cron, which authorizes the user in VKontakte using the login and password in the script itself, i.e. without user input in a dialog box, as suggested by the Oauth 2.0 authorization protocol . Next, we will work with methods that require user authorization on the site.
How to do it?
I understand that the question has already been dealt with hundreds of times, but the articles I found did not give the right answer, so do not rush to throw bricks;)
Answer the question
In order to leave comments, you need to log in
How to do it?
It is possible, but through a crutch. Open not a separate window, but a hidden iframe (via the target attribute) in which the page is processed and, depending on the incoming response (body or url content), there is a redirect in the iframe to the script (redirect_uri) located on your site. Since the final page opened in the iframe will be located on your server, security policies will not be violated when accessing both its content and from it (parent) - calling the js function to check authorization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question