# Login with authToken (MagicLink)

**URL:** <https://community.weweb.io/t/login-with-authtoken-magiclink/775>\
**Category:** How do I?\
**Created:** [July 12, 2022, 8:37pm UTC](https://community.weweb.io/t/login-with-authtoken-magiclink/775 "2022-07-12T20:37:51Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 18, 2023, 8:29pm UTC](https://community.weweb.io/t/login-with-authtoken-magiclink/775/21 "2023-01-18T20:29:16Z")

</div>

Thanks for this everyone, especially @kevinwasie 😊 I was able to get the javascript to successfully set the token in the plugin.

However I’m facing an error upon running the fetch user action. Wondering if anyone else ran into this.

After running the JS, I see the token properly set:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/16705e113f516ba7ac7655995bba65049b152518.png)

When I then run the Fetch User action I receive this 400:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/3c2c20add80cf808eb3a9f3d4ad2b68077108e7f.png)

Additionally, after the fetch user action fails, the token variable gets nulled out:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/478a3b19025468b4ce1f6f0e1bbae5ea6257e55d.png)

🤔

P.S. I’m actually not doing this for the sake of magic link - I’m doing it because the actual xano login action appears to be broken so I’ve resorted to using a request action to hit my login endpoint

---

_[View the full topic](https://community.weweb.io/t/login-with-authtoken-magiclink/775)._
