I have a email verification link which is broken by safelinks, how do I get around this issue?
Unanswered
Checkered Giant posted this in #help-forum
Checkered GiantOP
I have an email that is sent to the user's email address when they sign up to my site, but certain threat protection services like outlook's safelinks breaks the functionality because it calls the link before the user's client does, so in the case of email verification, the user clicks the "safe link" and that is making a GET request to my nextjs app where it's then being executed and verifying the user's email address, but by the time safe links redirects the user, the user is seeing "invalid email verification" which is proving to be a bit of a pain, I did it redirect to a page with a button that said "verify email" - but I hate this approach so much, it's so unintuitive, I've googled a lot about this issue, but have been unsuccessful in finding a work around. Does anyone have any ideas on how to solve this issue without adding an extra step?
(I've read that it's the initial HEAD request that's the problem, but not sure how to prevent a
(I've read that it's the initial HEAD request that's the problem, but not sure how to prevent a
page.ts from calling code based on a HEAD request).1 Reply
Havana
My suggestion here is :
- Find a way to determine if url is actually getting visited by a user, usually those scanners have specific user-agents that you could probably check for
- Do what you did with a button, not elegant but works
- Do what you did but with a hidden form/submit that sends/press the hidden button/form after some time, most of crawlers wont execute javascript, and for the user user will not be noticable :p
- Find a way to determine if url is actually getting visited by a user, usually those scanners have specific user-agents that you could probably check for
- Do what you did with a button, not elegant but works
- Do what you did but with a hidden form/submit that sends/press the hidden button/form after some time, most of crawlers wont execute javascript, and for the user user will not be noticable :p