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条)

报告相同问题?

悬赏问题

  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?