某网站A的用户登录之后,点击我的网站B的链接,也能登录状态。
相当于网站A的账号在我的网站B的也能用,登陆状态也同步
脑子现在一团浆糊,不知道有没有描述清楚
望大神提供一下思路。
网上查了一下,大概有两种方法
开发认证服务器
跨域cookie
都看的云里雾里
不知道什么方法比较简单易用
问了问大神,说可以设置秘钥,用户点击网站B的时候把秘钥和用户ID加密当做参数传递
高洛峰2017-04-17 17:37:56
One end successfully logs in and calls the session generation interface of other systems;
PHP中文网2017-04-17 17:37:56
This seems to be oAuth2. If you call it directly to generate a session, you probably need to do a redirect to set the cookie
迷茫2017-04-17 17:37:56
The simplest single sign-on is to use cookies, although it is not secure.
高洛峰2017-04-17 17:37:56
Two websites with the same main domain name can use cookies to achieve single sign-in. If they have different domain names, they need to share an authentication server.