logo

$5
Symfony 1.4 / sfDoctrineGuard stay signed in

I have a Symfony 1.4 / sfDoctrineGuard application and like to add a stay signed in function. I already found sfGuardRememberMeFilter, but how to use it? Is there a tutorial or something like that?

sn | 01/15/12 at 12:44pm | Edit


(2) Possible Answers Submitted...

  • avatar
    Last edited:
    01/15/12
    1:37pm
    Milena Dimitrova says:

    In order to enable sfGuardRememberMeFilter you have to edit security.yml of your secure app: add the filter and respective class name just above the security filter:

    remember_me:
    class: sfGuardRememberMeFilter

    security: ~


    Here is the tutorial (click on the Readme tab):
    http://www.symfony-project.org/plugins/sfDoctrineGuardPlugin

    • 01/16/12 1:22am

      sn says:

      I've already done this:

      Change the name or expiration period of the "Remember Me" cookie
      By default, the "Remember Me" feature creates a cookie named sfRemember that will last 15 days. You can change this behavior in app.yml:

      all:
      sf_guard_plugin:
      remember_key_expiration_age: 2592000 # 30 days in seconds
      remember_cookie_name: myAppRememberMe


      however no cookie is set. Don't I need to add some checkbox to the login form or something similar?

    • 01/20/12 4:38am

      sn says:

      OK. Seems like it is working, but there is an IP restriction on the Remember Me token. Is there a way to remove the IP address restriction? In the main target country of the website it's common for ISPs to disconnect their customers after a certain idle-time, so they get new dynamic IPs every few hours.

  • avatar
    Last edited:
    01/15/12
    8:41pm
    Luis Cordova says:

    yep configuration just like in sf2 :D

This question has expired.





Current status of this question: Community pot