multiauth_tutorial icon indicating copy to clipboard operation
multiauth_tutorial copied to clipboard

Fix logout routes and remember me

Open AshGDS opened this issue 6 years ago • 0 comments
trafficstars

Hi,

Thank you for your Multi Auth tutorials, they are very helpful. I have noticed a bug though - if you tick Remember Me when logging in, logging out does not work. This is because the logout functions we created in Part 4 are never being accessed. Currently, clicking logout takes you to Laravel's default /logout page instead of /users/logout and /admin/logout.

To fix this, I have:

  • Created a helpers.php file which contains two functions that can run in our blade file. One hides the logout dialogue from the admin login page, and the other returns the correct logout route.
  • Changed the logout routes to POST, as that is what Laravel is expecting.

Thanks :+1:

AshGDS avatar Sep 05 '19 12:09 AshGDS