File tree Expand file tree Collapse file tree
en/tutorials-and-examples/cms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,14 +145,6 @@ Then add the following::
145145 'queryParam' => 'redirect',
146146 ]);
147147
148- // Load identifiers, ensure we check email and password fields
149- $authenticationService->loadIdentifier('Authentication.Password', [
150- 'fields' => [
151- 'username' => 'email',
152- 'password' => 'password',
153- ],
154- ]);
155-
156148 // Load the authenticators, you want session first
157149 $authenticationService->loadAuthenticator('Authentication.Session');
158150 // Configure form data check to pick email and password
@@ -162,6 +154,14 @@ Then add the following::
162154 'password' => 'password',
163155 ],
164156 'loginUrl' => Router::url('/users/login'),
157+ 'identifier' => [
158+ 'Authentication.Password' => [
159+ 'fields' => [
160+ 'username' => 'email',
161+ 'password' => 'password',
162+ ],
163+ ],
164+ ],
165165 ]);
166166
167167 return $authenticationService;
You can’t perform that action at this time.
0 commit comments