I'm currently using 2 projects. 1 front end (with laravel backend to communicate with API) and another laravel project (the API).
现在,我使用Laravel Passport对用户进行身份验证,并确保每个API调用都是经过授权的调用.
现在,当我想要注销我的用户时,我向我的API发送POST请求(使用持有者令牌),并try 将他从API注销(并清除会话、Cookie.)
然后,在客户机上,我还刷新了我的会话,这样令牌就不再是已知的.现在,当我返回登录页面时,它会自动登录我的用户.(或者我的用户仍在登录).
Can someone explain me how to properly log out a user with Laravel passport?
Thanks in advance.