mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Fix login response not containing the token
This commit is contained in:
parent
239313d9fc
commit
3f90caaeb5
|
@ -28,8 +28,11 @@ class LoginAction extends BaseAction
|
||||||
event(new UserLoggedIn($this->users->findOrFail($data->userId), $data->token));
|
event(new UserLoggedIn($this->users->findOrFail($data->userId), $data->token));
|
||||||
|
|
||||||
// TODO: The client needs to pass through exceptions
|
// TODO: The client needs to pass through exceptions
|
||||||
|
$response = $this->success();
|
||||||
|
$response->getBody()->write(json_encode($data));
|
||||||
|
|
||||||
return $this->withRememberCookie(
|
return $this->withRememberCookie(
|
||||||
$this->success(),
|
$response,
|
||||||
$data->token
|
$data->token
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user