File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ security:
44
44
# session (for example when the users access directly to the login page).
45
45
default_target_path : blog_index
46
46
47
+ # Reference: https://symfony.com/doc/current/security/remember_me.html
48
+ remember_me :
49
+ secret : ' %kernel.secret%' # required
50
+ lifetime : 604800 # 1 week in seconds
51
+ # by default, the feature is enabled by checking a
52
+ # checkbox in the login form (see below), uncomment the
53
+ # following line to always enable it.
54
+ # always_remember_me: true
55
+
47
56
logout :
48
57
# The route name the user can go to in order to logout
49
58
path : security_logout
Original file line number Diff line number Diff line change 28
28
<label for =" password" >{{ ' label.password' | trans }}</label >
29
29
<input type =" password" id =" password" name =" _password" class =" form-control" />
30
30
</div >
31
+ <div class =" form-group" >
32
+ <label >
33
+ <input type =" checkbox" name =" _remember_me" checked />
34
+ Keep me logged in
35
+ </label >
36
+ </div >
31
37
<input type =" hidden" name =" _target_path" value =" {{ app .request .get (' redirect_to' ) }}" />
32
38
<input type =" hidden" name =" _csrf_token" value =" {{ csrf_token(' authenticate' ) }}" />
33
39
<button type =" submit" class =" btn btn-primary" >
You can’t perform that action at this time.
0 commit comments