保持跨多个域登录 [英] Stay logged in across multiple domains

查看:150
本文介绍了保持跨多个域登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  跨域单一选择登录

我使用的是属于同一个网站的多个域的PHP,
我想知道,如果它能够保持用户登录的所有领域,他们一旦登录,在域之一。

I'm using php on multiple domains that belong to the same website, I was wondering if it's possible to keep the users logged in on all domains, once they log in, in one of the domains.

这怎么可能?

推荐答案

我做了很简单的东西和它的作品,你有一台服务器与该记住用户的会话,然后使用JavaScript您查询该服务器,看它是否知道用户,如果它不那么你就验证当前域相同的用户,你绕过密钥识别登录哪些用户。

I did something really simple and it works, you have one server with a session that remembers the user, then using javascript you query that server to see if it knows the user, if it does then you authenticate the same user on the current domain, you pass around a secret key to identify what user to log in.

这篇关于保持跨多个域登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆