diff --git a/docs/cookbook/recipe_sonata_admin_without_user_bundle.rst b/docs/cookbook/recipe_sonata_admin_without_user_bundle.rst index 4ab51d9c45..fe1d7e77fe 100644 --- a/docs/cookbook/recipe_sonata_admin_without_user_bundle.rst +++ b/docs/cookbook/recipe_sonata_admin_without_user_bundle.rst @@ -241,9 +241,9 @@ more about it `here router->generate('admin_login')); } - protected function getLoginUrl(): RedirectResponse + protected function getLoginUrl(): string { - return new RedirectResponse($this->router->generate('admin_login')); + return $this->router->generate('admin_login'); } public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey): RedirectResponse