File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,27 @@ this:
167
167
The user will then automatically be logged in on subsequent visits while
168
168
the cookie remains valid.
169
169
170
+ Beware that in the new Authenitaction System you have to set the RememberMeBadge()
171
+ in the authenticate method of the authenticator, like:
172
+
173
+ .. code-block :: php
174
+
175
+ public function authenticate(Request $request): PassportInterface
176
+ {
177
+ $email = $request->request->get('email', '');
178
+
179
+ $request->getSession()->set(Security::LAST_USERNAME, $email);
180
+
181
+ return new Passport(
182
+ new UserBadge($email),
183
+ new PasswordCredentials($request->request->get('password', '')),
184
+ [
185
+ new CsrfTokenBadge('authenticate', $request->get('_csrf_token')),
186
+ new RememberMeBadge(),
187
+ ]
188
+ );
189
+ }
190
+
170
191
Forcing the User to Re-Authenticate before Accessing certain Resources
171
192
----------------------------------------------------------------------
172
193
You can’t perform that action at this time.
0 commit comments