mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-16 02:05:01 +00:00
added it_logout_user test
This commit is contained in:
@@ -33,7 +33,6 @@ class CreateNewUser implements CreatesNewUsers
|
||||
])->validate();
|
||||
|
||||
$user = User::create([
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
'password' => Hash::make($input['password']),
|
||||
]);
|
||||
|
||||
@@ -101,30 +101,6 @@ class AuthController extends Controller
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout user entity
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo(Auth::id())) {
|
||||
return response('Logout successfull', 204)
|
||||
->cookie('access_token', '', -1);
|
||||
}
|
||||
|
||||
// Get user tokens and remove it
|
||||
auth()->user()->tokens()->each(function ($token) {
|
||||
|
||||
// Remove tokens
|
||||
$token->delete();
|
||||
});
|
||||
|
||||
return response('Logout successful', 204)
|
||||
->cookie('access_token', '', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make login request for get access token
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user