doupao1978 2012-05-10 14:21
浏览 48

混合身份验证 - 会话到期时该怎么办?

I've written a system based on the HybridAuth library available here: http://hybridauth.sourceforge.net/

The user can login using Facebook, Twitter, and the sites local login system.

However I'm wondering what should happen when the PHP session expires (24 minutes currently - default setting). Previously with single sign on systems I've just redirected the user there and should they have checked remember me it automatically re-establishes there connection.

Now though I have three methods in which a user can login.

These are the options I've come up with so far:

  • Try connecting with each of the available authentication methods until a connection is found
  • Store a cookie client side with information of which authentication provider the user last used and only try that one
  • Force the user to choose how to login again (not ideal)

If anyone has any suggestions please share.

  • 写回答

1条回答 默认 最新

  • dongliping003116 2012-05-10 14:43
    关注

    I would save a cookie with login information containing the login method and use that everytime the session expires.

    If the user login using another method I would replace the old cookie (or the old login method) with the new one.

    So Your second option.

    The third is confusing for the user and the first one is unnecessarily resources consumpting...

    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能