Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

I believe the problem lies in the use of auth.basic. The credentials entered for basic HTTP authentication are remembered by your web browser until you close it. So you are logging out, and then your browser just sends the credentials again on the next page load.

If you want to be able to log out without closing the browser, you'll need to step away from auth.basic and move to the more advanced authentication methods.

Last updated 2 years ago.
0

Yep, due to the nature of basic authentication - you can't log out without closing the browser. Create yourself a login view and controller, and use that instead to log in users, then the auth::logout feature will work.

Last updated 2 years ago.
0

Thanks, @edrands and @AndrewBNZ. I did move to using just the auth rather than auth.basic filter and got it working.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jlowerynyc jlowerynyc Joined 19 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.