doukuang1897 2015-04-15 09:02
浏览 10
已采纳

HWIOAuthBundle与FOSUserBundle和记住我的选项

So I have the HWIOAuth Bundle and FOSUserBundle and when I am using the remember me option for some reason it keeps looping in /login/ route. However if I logout and login it works fine till it needs to be refreshed.

My project is a open source one here: https://github.com/LoopTeam/LoopAnime-Website

Security Settings with remember me option enabled here: https://github.com/LoopTeam/LoopAnime-Website/blob/develop/app/config/security.yml

The routes are here: https://github.com/LoopTeam/LoopAnime-Website/blob/develop/app/config/routing.yml

My provider is this one: https://github.com/LoopTeam/LoopAnime-Website/blob/develop/src/LoopAnime/UsersBundle/Security/Core/User/FOSUBUserProvider.php

Can someone tell me what I am doing wrong? Thank you.

-- Edit --

Also this is on my Profiler, so i have the authentication opened but for some reason it loops on login page: http://grab.by/Gru2

  • 写回答

1条回答 默认 最新

  • 普通网友 2015-04-16 09:12
    关注

    The problem was related to the permissions of the paths -- to remember that Symfony has 3 authentications levels from low to high there is - IS_AUTHENTICATED_ANONYMOUSLY , IS_AUTHENTICATED_REMEMBERED and IS_AUTHENTICATED_REMEMBERED

    My index page was set to IS_AUTHENTICATED_REMEMBERED and the remember token is IS_AUTHENTICATED_REMEMBERED changing that for this last one fixed the issue.

    To know more about permissions: http://symfony.com/doc/current/cookbook/security/remember_me.html

    Regards

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

报告相同问题?

悬赏问题

  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写