diff --git a/config/packages/security.yaml b/config/packages/security.yaml index b0aff30..246da82 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -36,4 +36,4 @@ security: # Note: Only the *first* access control that matches will be used access_control: # - { path: ^/admin, roles: ROLE_ADMIN } - # - { path: ^/profile, roles: ROLE_USER } + - { path: ^(?!/(login|register|reset-password)), roles: ROLE_USER } diff --git a/src/Security/AppAuthenticator.php b/src/Security/AppAuthenticator.php index f534e89..cf8f8ba 100644 --- a/src/Security/AppAuthenticator.php +++ b/src/Security/AppAuthenticator.php @@ -96,7 +96,7 @@ class AppAuthenticator extends AbstractFormLoginAuthenticator implements Passwor return new RedirectResponse($targetPath); } - return new RedirectResponse($this->urlGenerator->generate('logout')); + return new RedirectResponse($this->urlGenerator->generate('user_page')); } protected function getLoginUrl()