# Magic link OTP invalidated

**URL:** <https://community.auth0.com/t/magic-link-otp-invalidated/78243>\
**Category:** Get Help\
**Tags:** passwordless, magic-link, auth0\
**Created:** [February 14, 2022, 1:09pm UTC](https://community.auth0.com/t/magic-link-otp-invalidated/78243 "2022-02-14T13:09:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![puriarte](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/puriarte/32/34266_2.png) [@puriarte](https://community.auth0.com/u/puriarte)\
**Post date:** [February 14, 2022, 1:09pm UTC](https://community.auth0.com/t/magic-link-otp-invalidated/78243/1 "2022-02-14T13:09:49Z")

</div>

Hello, I’m new in the community. I’m having a strange problem with passwordless authentication with magic link. I’ve implemented an authentication process that works fine in most cases but some users have reported issues. Looking throw the logs, for one of the users I found this particular pattern repeatedly.

First a CLS request, this is sent from my web app  
{…  
“type”: “cls”,  
“connection”: “email”,  
“user\_agent”: “Java/11.0.12”,  
“date”: “… 15:15:25”,  
}

five seconds later this “Success” from a user\_agent that does not correspond to the user’s browser  
{…  
“type”: “s”,  
“connection”: “email”,  
“user\_agent”: “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36”,  
“date”: “… 15:15:30”,  
}

And then one minute later the log is generated when the user opens the link for the first time  
{…  
“type”: “fp”,  
“connection”: “email”,  
“user\_agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36”,  
“date”: “… 15:16:40”,  
}

I have tried copying and pasting the link in the browser and still, the issue persists.

Any idea why this can happen? is it possible to block requests from a particular agent?

Thank you  
Pablo

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 1, 2022, 5:01pm UTC](https://community.auth0.com/t/magic-link-otp-invalidated/78243/3 "2022-03-01T17:01:24Z")

</div>

Hi @puriarte,

It sounds like the user’s email client may be opening the link by default. If you can narrow it down to this issue, and your users aren’t able to adapt to it, you may need to switch to OTPs instead of links.

Here are a couple of threads that describe this issue:

> [@"Link protect" software breaks passwordless auth](https://community.auth0.com/t/link-protect-software-breaks-passwordless-auth/60395):
>
> Hi there, we use passwordless-email auth. One of our customers has some awful “Mimecast” security software, it runs all emailed links through a proxy. This breaks passwordless login for them; I think because the link-protection software tries to generate a preview and thus consumes the token, and then the user’s browser visits the link but it’s already been visited. Does anyone have any suggestions to work around this? Is there a way to allow emailed links to be used twice?

> [@Passwordless login breaks for many users on corporate e-mail domains](https://community.auth0.com/t/passwordless-login-breaks-for-many-users-on-corporate-e-mail-domains/56821):
>
> We get lots of reports from users, who are using corporate e-mail domains, failing to sign up and login with the passwordless login mechanism on our application. They receive our login e-mail, but when they click the link, they’re not able to complete the process. It’s like the token had expired immediately. If I look into the logs, I see several instances of “Failed Login (wrong password)” (but also “Success Exchange” and “Success Login”) so I’m not sure what is happening. A friend tells me th…

---

<div class="post-metadata">

**Author:** ![puriarte](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/puriarte/32/34266_2.png) [@puriarte](https://community.auth0.com/u/puriarte)\
**Post date:** [March 3, 2022, 7:52pm UTC](https://community.auth0.com/t/magic-link-otp-invalidated/78243/4 "2022-03-03T19:52:42Z")

</div>

Thanks for your answer. I’ll try to implement a landing page as suggested by Ale in this thread.

> [@Re use same password less email link](https://community.auth0.com/t/re-use-same-password-less-email-link/71247):
>
> Hi We have a user that have a server that checks all his email and click on every link. So so email link he is receiving is invalid. I can’t find an option to make the link living longer and more than one click? Regards, Stéphane

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 22, 2022, 12:09am UTC](https://community.auth0.com/t/magic-link-otp-invalidated/78243/5 "2022-04-22T00:09:13Z")

</div>


