-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid signaure #98
Comments
Same here, but with Symfony 6 and php 8.1 on localhost without specific domain name. |
This may be caused by a long standing bug that I just uncovered in MakerBundle where the This has been fixed in https://github.com/symfony/maker-bundle/releases/tag/v1.47.0 |
I have the same problem, still with the added I use the bundle in an I dispatch a message manually which triggers the following handler <?php
namespace App\MessageHandler;
use App\Message\VerifyEmailAddressMessage;
use App\Repository\UserRepository;
use App\Security\EmailVerifier;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
final class VerifyEmailAddressHandler implements MessageHandlerInterface {
public function __construct(
private EmailVerifier $emailVerifier,
private UserRepository $userRepository,
private MailerInterface $mailer
) {
}
public function __invoke(VerifyEmailAddressMessage $verifyEmailAddressMessage) {
$user = $this -> userRepository -> find($verifyEmailAddressMessage -> getUserId());
if ($user) {
$this -> emailVerifier -> sendEmailConfirmation('app_register_verify', $user,
(new TemplatedEmail())
-> to($user -> getEmail())
-> subject('My subject')
-> htmlTemplate('email/auth/verify_email/email.html.twig')
);
} else {
// .....
}
}
} and with the content of the following email template: {% extends 'email/base.html.twig' %}
{% block content %}
<p>Hi,</p>
<p>Bla blabla.</p>
<a href="{{ signedUrl | raw }}">Verify email address</a>
{% endblock %} |
Did you already have a solution fo this. I have the same problem en the helper still comes with an exception that link is not valid. Cheers! |
nope :(, but were working on it. If we got a solution... I let you know! |
I do everythong one by one from tutorial.
I can register user, login etc.
but link in email i recive is always with exeption "The link to verify your email is invalid. Please request a new link."
I running clear php-apache on docker
timezone is OK
URL is ok (is in http without ssl)
maybe is not good couse i have local addresses for docker ending with ".docker" ?
my example url is: http://symofny5.docker/verify/email?expires=1640891770&id=8&signature=%2B%2BqkHGkLMIcXl1qVly%2BhdM9FeXtTLrhTYdQHSJppSZk%3D&token=GEEDqW1Wk2FUfTsy3T2S10%2BzvnVxuXBNo%2B%2BEU2X5NXk%3D
I checked, and ID is ok, in function "verifyUserEmail" it find good user.
I use symfony 5.4.2 php 7.4
Thanks in advanced!
The text was updated successfully, but these errors were encountered: