File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ Using the remember me cookie is not always appropriate (e.g. you should not
111
111
use it on a shared PC). This is why by default, Symfony requires your users
112
112
to opt-in to the remember me system via a request parameter.
113
113
114
+ Remember Me for Form Login
115
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
116
+
114
117
This request parameter is often set via a checkbox in the login form. This
115
118
checkbox must have a name of ``_remember_me ``:
116
119
@@ -133,6 +136,25 @@ checkbox must have a name of ``_remember_me``:
133
136
Optionally, you can configure a custom name for this checkbox using the
134
137
``name `` setting under the ``remember_me `` section.
135
138
139
+ Remember Me for JSON Login
140
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
141
+
142
+ If you implement the login via an API that uses :ref: `JSON Login <json-login >`
143
+ you can add a ``_remember_me `` key to the body of your POST request.
144
+
145
+ .. code-block :: json
146
+
147
+ {
148
+ "username" : " dunglas@example.com" ,
149
+ "password" : " MyPassword" ,
150
+ "_remember_me" : true
151
+ }
152
+
153
+ .. note ::
154
+
155
+ Optionally, you can configure a custom name for this key using the
156
+ ``name `` setting under the ``remember_me `` section.
157
+
136
158
Always activating Remember Me
137
159
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138
160
You can’t perform that action at this time.
0 commit comments