We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 799c647 commit 9c7aacbCopy full SHA for 9c7aacb
docs/guides/mobile_apps.md
@@ -40,8 +40,13 @@ class LoginController extends BaseController
40
->setStatusCode(422);
41
}
42
43
+ // Get the credentials for login
44
+ $credentials = $this->request->getPost(setting('Auth.validFields'));
45
+ $credentials = array_filter($credentials);
46
+ $credentials['password'] = $this->request->getPost('password');
47
+
48
// Attempt to login
- $result = auth()->attempt($this->request->getPost(setting('Auth.validFields')));
49
+ $result = auth()->attempt($credentials);
50
if (! $result->isOK()) {
51
return $this->response
52
->setJSON(['error' => $result->reason()])
0 commit comments