Answer the question
In order to leave comments, you need to log in
[SOLVED] VKontakte Cross-Domain Authentication
0. Open a “clean” browser or clear all cookies / ETC - private data
1. Go to vk.com and log in
2. Open vkontakte.ru
And see yourself logged in.
Question: How did they do it? ( i.e. how does vkontakte.ru understand that I am the same person as on vk.com? )
Answer the question
In order to leave comments, you need to log in
In fact, when logging in to VKontakte, the POST request goes to https://login.vk.com/ . It saves something in cookies and redirects to http://vkontakte.ru/login.php with some hash in GET parameters. That's how it works.
You have not cleared all private data.
ps After deleting cookies on vkontakte.ru/vk.com, you should log out. You are doing something wrong.
There is actually not POST, but GET
Steps are as follows:
1. vkontakte.ru/feed, redirects to login.vk.com/ with parameters from where, hash ip (interestingly, this is in case of a disabled referrer) and the page where, I so I suspect
2. Login.vk.com redirects to the page where you went, i.e. on vkontakte.ru/feed
3. And from there, session cookies are set that you are logged in.
Those. it turns out that all session cookies are set only on vkontakte.ru itself, which is logical for organizing a session. This means that SSO transferring session identifiers between login.vk.com and sites that use it via internal connections between servers, and with GETs with redirects we simply take session cookies
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question