delight-im/PHP-Auth

clicking 2 times on verification link in verification email

johntunnel opened this issue · 2 comments

Hi
When clicking 2 or more times on verification email I get "Invalid token" reply.
Is it possible to get another information like: "This account has already been activated" or "Activation link already confirmed" or similar to give user info that he has already clicked it (activated it)?
My meaning is that for only this case, when clicking same activation link twice or more, you get a different reply. I guess there may be other cases when "Invalid token" may be a suitable reply.

ocram commented

Thanks!

This is indeed not possible right now. We could consider this in the future, but have no immediate plans. Sorry.

Could you instead adjust the wording in your UI, perhaps? For example, “link is invalid or your email has already been confirmed”.

Apart from that, you could use one of the variants that also perform a login immediately. This way, it should be harder to miss the change as a user, if it’s the initial confirmation.

Finally, you could store your own flag in the session data, e.g.

$_SESSION['last_successful_confirmation'] = \time();

and then, after a failed confirmation attempt, check whether a successful attempt had been made in the seconds, minutes or hours before. What do you think?

Your suggestion to change the wording in UI will do the trick !
Thanks.