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
111111use it on a shared PC). This is why by default, Symfony requires your users
112112to opt-in to the remember me system via a request parameter.
113113
114+ Remember Me for Form Login
115+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
116+
114117This request parameter is often set via a checkbox in the login form. This
115118checkbox must have a name of ``_remember_me ``:
116119
@@ -133,6 +136,25 @@ checkbox must have a name of ``_remember_me``:
133136 Optionally, you can configure a custom name for this checkbox using the
134137 ``name `` setting under the ``remember_me `` section.
135138
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+
136158Always activating Remember Me
137159~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138160
You can’t perform that action at this time.
0 commit comments