getPayload()->getString(' Warning: Undefined variable $username_field in /usr/home/adamus1234/domains/localization.adamus1234.smallhost.pl/public_html/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php on line 19 '); $request->getSession()->set(SecurityRequestAttributes::LAST_USERNAME, $ Warning: Undefined variable $username_field_var in /usr/home/adamus1234/domains/localization.adamus1234.smallhost.pl/public_html/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php on line 21 ); return new Passport( new UserBadge($ Warning: Undefined variable $username_field_var in /usr/home/adamus1234/domains/localization.adamus1234.smallhost.pl/public_html/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php on line 24 ), new PasswordCredentials($request->getPayload()->getString('password')), [ new CsrfTokenBadge('authenticate', $request->getPayload()->getString('_csrf_token')), Warning: Undefined variable $remember_me_badge in /usr/home/adamus1234/domains/localization.adamus1234.smallhost.pl/public_html/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php on line 27 ] ); } public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response { if ($targetPath = $this->getTargetPath($request->getSession(), $firewallName)) { return new RedirectResponse($targetPath); } // For example: // return new RedirectResponse($this->urlGenerator->generate('some_route')); throw new \Exception('TODO: provide a valid redirect inside '.__FILE__); } protected function getLoginUrl(Request $request): string { return $this->urlGenerator->generate(self::LOGIN_ROUTE); } }