I'm running a laravel API with a login page and a nuxt.js application which authenticates a user through oauth.
The whole authorization flow is working, but after successfully logging out in the nuxt.js app a user is not asked for user credentials anymore on further logins.
How can I manage that the user is asked for his credentials again on next login?
Question is similar to this but I don't want to delete any authorization tokens, I want user to again login.
I already created a custom endpoint in my api but it doesn't seem to work:
public function logoutApi()
{
Auth::guard('web')->logout();
$cookie = \Cookie::forget('laravel_session');
\Session::flush();
return response('User has been logged out.')->cookie($cookie);
}
Any ideas?