when I do
session()->flush();
It also logging out a user, but
if you check Auth::user()
you will see authentication passes.
It makes a strange situation when you have logged out, but phpunit cannot assert it.
You mean you're loggin an user out with just session()->flush? You should use Auth::logout(). Session and Authentication are two separate contexts.
Hi there,
Looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs or problems. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
@federicotorrisi , @driesvints , thank you for your attention. BUT It is not a question it is a bug report. I don't want to log out a user, even less I what to log out a user in a way that Auth::user() - wouldn't know about it. I want to clear all the data that I put to session and that is it. My suggestion would be to store sessio() variables in separate array element to not overlap with Authentication. Or maybe make Authentication check if user was cleared from session. My bug report is about two systems that overlap/clash and break each other. When it should be - as @federicotorrisi said - Session and Authentication are two separate contexts.
@Eugene-Melbourne that's unfortunately not how it works in both Lumen and Laravel. If you have ideas on how this can be improved or concerns I think the best place to discuss this is https://github.com/laravel/ideas