z-song / laravel-admin

Build a full-featured administrative interface in ten minutes
https://laravel-admin.org
MIT License
11.15k stars 2.82k forks source link

Bug after log out from admin panel #4987

Closed ikkigod closed 4 years ago

ikkigod commented 4 years ago

Description:

There is a bug when you log out of control panel and then log in to the web page normally (it redirects you to the admin panel when you enter the data). Then try to refresh the page and redirect you to /home which may appear as 404 Not Found.

Steps To Reproduce:

  1. Sign in to the admin panel.
  2. Log out in the admin panel.
  3. Go to yourdomain.com/login
  4. Try logging in with your account (you will be redirected to the admin panel)
  5. Refresh the page (you will be redirected to yourdomain.com/home)
ikkigod commented 4 years ago

@z-song any answers?

z-song commented 4 years ago

@l3lackS Fixed ,upgrade to version v1.8.5

lehelkeresztes commented 3 years ago

The fix for this is causing a new issue on the latest version v1.8.11 - you always get redirected to the home route.

Steps to reproduce: 1) access a link which isn't home while not logged in 2) when redirected to login page, login 3) you'll be redirected to admin home instead of the original target.

The issue arises because ->to() doesn't save the intended URL as ->guest() does.