bulamao
V2EX  ›  PHP

老铁们

  •  
  •   bulamao · Apr 13, 2020 via iPhone · 2768 views
    This topic created in 2248 days ago, the information mentioned may be changed or developed.

    tp5 加 swoole 做了一个微信扫码登录的,因为 swoole 不能共享 session,登陆进去的后端还是使用 session 存储的,。 目前的做法是在登陆页面生成一个带参数的二维码、在保存到 cookie 里、然后手机端扫码对比参数、如果成功、在数据库中增加一个数据保存当前参数、跳转到 tp5 验证 cookie 和数据库参数如果成功则登陆成功

    有没有更好的办法呢 ?

    2 replies    2020-04-15 20:57:07 +08:00
    bulamao
        1
    bulamao  
    OP
       Apr 14, 2020
    没人嘛?
    ywisax
        2
    ywisax  
       Apr 15, 2020
    纯 http 解决的话,可以试试 sse
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5685 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:43 · PVG 09:43 · LAX 18:43 · JFK 21:43
    ♥ Do have faith in what you're doing.