Today, something pulled the authorization to your site through Vkontakte. I rotated on the Internet, looked at a typical solution
on the website of Vkontakte . Decided to check. And it did not work out.
Moreover, he went to the site of the
great and mighty . But there it did not work.
Looked for information on Habré, then on Google, then began to test.
The first test struck me deeply:
VK.Auth.login(function(response) {
if (response.session) {
var date = new Date(response.session.expire*1000);
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
var formattedTime = hours + ':' + minutes + ':' + seconds;
alert(formattedTime);
}
}
);
')
To fix the result, I rolled the time on the local machine an hour back, tried to log in. And authorized.
Gentlemen, can, after all, correct the time on the server Vkontakte? Well, or at least the lifetime of cookies, put not an hour, but one and a half. It is unlikely that the uncle decides that it is necessary to correct the watch for another half an hour. Better yet, pull out the cookie time as a variable. In general, do something, but it does not work out well.