donglong1465 2014-02-20 05:44
浏览 42
已采纳

在子域中的多个商店中共享opencart登录会话

I have a opencart site with muti store installed. There are around 4 stores installed in sub domains using the multi store feature

mystore.com
a.mystore.com
b.mystore.com
c.mystore.com

the problem is when a user logins to any store and if he is moving to a different store, the user needs to login again. I find this annoying for users.

Is there a way to share the login session across all the subdoamins so when a users logins to any store he will be logged to all the other stores automatically?

I need only share only the login, not the cart.

any help will be appreciated.

  • 写回答

2条回答 默认 最新

  • douxianji6104 2014-02-20 06:00
    关注

    To achieve this type of structure, You need to work as API structure. Follow steps,

    1) Create one token on login and store this token over session/memcache server

    2) Store this token in your cookie

    3) Pass this token on every call of your domain. Fetch from cookie and pass to your website

    4) Your website will identify this token with your session server. If found then it's logged in

    Hope that helps !!!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型