From 4b75213c66d04886a1df5a18e85c50845a18d6e0 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Tue, 30 Apr 2024 17:35:32 +0200 Subject: [PATCH] [Security]: Redirect user to profile page Page: https://symfony.com/doc/5.x/security/custom_authenticator.html The homepage is public. After login, you should redirect the user to some *protected* page. --- security/custom_authenticator.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/custom_authenticator.rst b/security/custom_authenticator.rst index e79d8a002a1..9614c3a4e55 100644 --- a/security/custom_authenticator.rst +++ b/security/custom_authenticator.rst @@ -163,7 +163,7 @@ can define what happens in these cases: ``onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response`` If the user is authenticated, this method is called with the authenticated ``$token``. This method can return a response (e.g. - redirect the user to the homepage). + redirect the user to their profile page). If ``null`` is returned, the request continues like normal (i.e. the controller matching the login route is called). This is useful for API