How to use for login form. Not validate recaptcha
It is working for my Registration form. I put the same twig code in login twig file. But it allow sign-in without validation recaptcha click. Help me please. I have deadline for project.
This is my question too
same issue ... did you find response ?
This issue appears to be a duplicate of https://github.com/excelwebzone/EWZRecaptchaBundle/issues/63 which has an answer in gist: https://gist.github.com/unti1x/eef5aee81d5caf90729fac9239d3b095
Hi :) Super easy to integrate in a regular form but I still can't find a way to integrate it the login form as I don't have a LoginType.php
My login form is coming from: https://symfony.com/doc/current/security.html#form-login
I don't understand how to follow the suggested Gist...
class SecurityController extends AbstractController
{
/**
* @Route("/login", name="login", methods={"GET", "POST"})
* @param AuthenticationUtils $authenticationUtils
* @return Response
*/
public function login(AuthenticationUtils $authenticationUtils)
{
if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED'))
return $this->redirectToRoute('home');
$error = $authenticationUtils->getLastAuthenticationError();
return $this->render('security/login.html.twig', [
'error' => $error,
]);
}
twig:
<form action="{{ path('login') }}" method="post">
<input id="username" name="_username" class="form-control" type="text" placeholder="Email address" />
<input id="password" name="_password" class="form-control" type="password" placeholder="Password" />
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
<button type="submit" name="submit">Log in</button>
</form>
EDIT: I'm using the V3 btw.