Closed coolsam726 closed 2 years ago
This is the case only if you use Inertia - Vue stack for your breeze installation.
This issue is not related to acacia. It is an inertia issue and the way to get around it is to use the default (blade) stack for inertia in your app and include this code on the AuthenticatedSessionController::create method:
public function create(Request $request)
{
if (\Request::inertia()) {
return Inertia::location(url()->current());
}
return view('auth.login');
}
If you must use the Vue-Inertia breeze stack, then instead of redirecting after login (store() function
), you can do Inertia::location
to force a full page load.
public function store(LoginRequest $request)
{
$request->authenticate();
$request->session()->regenerate();
// return redirect()->intended(RouteServiceProvider::HOME);
$path = session()->pull('url.intended', RouteServiceProvider::HOME);
return Inertia::location(url($path));
}
The same rules apply on logout.
This might be due to the fact that the redirection is via inertia but the backend uses a different root view.