Fix tenant admin Google OAuth redirect
This commit is contained in:
@@ -57,6 +57,7 @@ class TenantAdminGoogleController extends Controller
|
||||
|
||||
Auth::login($user, true);
|
||||
$request->session()->regenerate();
|
||||
$request->session()->forget('url.intended');
|
||||
|
||||
$returnTo = $request->session()->pull('tenant_oauth_return_to');
|
||||
if (is_string($returnTo)) {
|
||||
@@ -66,7 +67,12 @@ class TenantAdminGoogleController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->intended('/event-admin/dashboard');
|
||||
$fallback = $request->session()->pull('tenant_admin.return_to');
|
||||
if (is_string($fallback) && str_starts_with($fallback, '/event-admin')) {
|
||||
return redirect()->to($fallback);
|
||||
}
|
||||
|
||||
return redirect()->to('/event-admin/dashboard');
|
||||
}
|
||||
|
||||
private function sendBackWithError(Request $request, string $code, string $message): RedirectResponse
|
||||
|
||||
Reference in New Issue
Block a user