Django-Verify-Email icon indicating copy to clipboard operation
Django-Verify-Email copied to clipboard

Verification link always invalid when trying to register again with the same email address

Open evyd13 opened this issue 3 years ago • 0 comments

Issue is on this line: https://github.com/foo290/Django-Verify-Email/blob/95b653a260bc1f97149967e016bb46e816f9f3e2/verify_email/token_manager.py#L147

When you register using an unused email, everything works perfectly. The issue arises when you register again using the same email address, which is allowed by default in Django. This results in the first item getting picked, which is the one created earlier. The verification token will not match and you'll land on an error page. Maybe it's a good idea to sort by date_joined to prevent this from wrongly happening?

evyd13 avatar Sep 29 '22 09:09 evyd13