duanbi3385 2016-03-16 12:47 采纳率: 100%
浏览 186
已采纳

OAuth2单点登录组件,强制重新认证

Right now I have a Abstract Adapter that handles all the different social medias, the social media adapters just hold the information and pass that to the abstract adapter that then uses OAuth2 to authenticate the user and allows API calls to be made. I want to FORCE the user to reauthenticate everytime they try to login, link or unlink an account. How do I tell OAuth2 I want them to reauth everytime? This is what I pass right now for the authentication:

$this->_oauth = new \League\OAuth2\Client\Provider\GenericProvider(array(
        'clientId'                => $this->_key,
        'clientSecret'            => $this->_secret,
        'redirectUri'             => $this->getObject('request')->getBaseUrl() . $this->_redirect_uri,
        'urlAuthorize'            => $this->_authorize_uri,
        'urlAccessToken'          => $this->_access_uri,
        'urlResourceOwnerDetails' => ''
    ));

So my question, everything works fine, linking, unlinking and signing into an account which has been linked with a social media using that social media. But how do I force the user to reauth everytime even if they logged into Facebook 5 minutes ago and Facebook knows it still has a active session? (Same thing for all other social medias, Facebook is just an example)

  • 写回答

1条回答 默认 最新

  • douliedu335997 2016-04-28 12:52
    关注

    The answer is that besides for Facebook and Google it's impossible to force reauth. OAuth2 also offers nothing for this.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条