I am currently developing a browser like qt webview. There is a requirement that after a computer logs into a certain website, other computers in the local area network will automatically log in when using this software. I want to achieve this by sharing cookies. Is it possible? I am not very familiar with network and website technology. Someone familiar with it can talk about it.
cookies
sharing has nothing to do with whether it is a local area network, but has something to do with the processing logic of the web application! If the code or web application doessession persistence
, or doescookies sharing
, then it is OK, otherwise it is NoCookie sharing means that multiple domain names can access the same cookie, but the cookie itself can only exist in one browser. The server cannot send the cookie to all computers in the LAN.
lz To achieve this, browsing within the LAN is required. Cookies are shared between servers
The server does not know when you copy a cookie to log in, unless it records your IP and the IP origin of the machine you copy to is very different
I personally think no one will check it. I am not optimistic about cookies and my account will be lost. It's a personal matter, no one cares. So no one will care if you log in through shared cookies.
Of course, it is not ruled out that if you are bored, you can add some uniqueness check when generating the token cookie, such as the canvas fingerpint that was very popular in the previous period. Such cookies cannot be copied and used.
I think you can try the server side to deal with this problem. The public IP in the unified LAN is the same, so you can do it based on this idea.