Skip to content
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

Verifying mail signature failed on prod #149

Open
fschasse opened this issue Nov 25, 2023 · 2 comments
Open

Verifying mail signature failed on prod #149

fschasse opened this issue Nov 25, 2023 · 2 comments
Labels
Status: Needs Review Needs to be reviewed

Comments

@fschasse
Copy link

Hey,

Thanks your for verify-email-bundle.
I've a problem with the mail signature online.

I've use this tutorial for use the bundle : https://symfonycasts.com/screencast/symfony-security/verify-email

All is right on local (127.0.0.1). The mail link is valid.
When I try to use in prod (online) I've a message : The link is invalid.

This is a link example on prod :
https://www.chasseprecision.com/user/verify/email?expires=1700923576&id=37&signature=KooiveHUhpnzAPZN4VciLsoPeiKswPJuA2rly3gBNAQ%3D&token=qFp07VBkjvF0gkKZ%2B%2F30yCTaw8rSxjPjyMcSs0Txe2E%3D

There is a special config for prod ?
How can I verifying the right signature ? (with log for compare the link send in mail)

Thank you

@Vastuney
Copy link

It's the same with me, on the local dev and prod work flawlessly while on the target domain (prod) pops up a message that the link is invalid.

@jrushlow
Copy link
Collaborator

Howdy, I'm working out tests related to this now over in maker-bundle. But, I'm not able to reproduce the error. VerifyEmailBundle should just work regardless of the environment.

The only thing that I can think of is http vs https - e.g. if verify-email signs http://example.com but the user is redirected to https://example.com - validation will fail because the resulting hmac will be different from those 2 strings. I'm not sure this is the actual problem but I have a feeling it's something to do with the domain / url thats generated vs what the user is actually "clicking" in the email + redirects.

An app the reproduces this error between the different environments would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review Needs to be reviewed
Projects
None yet
Development

No branches or pull requests

3 participants