# Editor redirect link issues: Reset password using Xano + Sendgrid magic link

**URL:** <https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276>\
**Category:** Ask us anything\
**Tags:** authentication, xano\
**Created:** [November 7, 2023, 6:06pm UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276 "2023-11-07T18:06:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/adam/32/9449_2.png) [@Adam](https://community.weweb.io/u/Adam)\
**Post date:** [November 7, 2023, 6:06pm UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/1 "2023-11-07T18:06:18Z")

</div>

Hi,  
I am trying to allow a user to request a password reset of they forgot it. I have set up the sendgrid magic link flow and have used my “Reset password” page url as the redirect url.

I am running into issues with the redirect. When I click on the link in the email, it takes me to my website home page rather than the page I entered into the redirect setting, and there is no token in the url. Could this be because I am testing in the editor, there the url is a weird format? Or is this caused by some other reason?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [November 9, 2023, 8:35am UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/2 "2023-11-09T08:35:19Z")

</div>

Hi @Adam 👋

If memory serves me well, you should be able to test in the editor but you’ll need to update the link in Xano.

Here’s [the section about this in our docs](https://docs.weweb.io/plugins/auth-systems/xano-auth.html#forgot-password-with-xano-auth):

 ![CleanShot 2023-11-09 at 09.32.01@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a180abed5e1d8f496361fb5644236ebb36afc0d2.jpeg)

Does that help?

_PS: I know the article is super long and not very easy to navigate. I’ll revamp it to make it easier to skim through asap!_

---

<div class="post-metadata">

**Author:** ![Adam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/adam/32/9449_2.png) [@Adam](https://community.weweb.io/u/Adam)\
**Post date:** [November 9, 2023, 8:47am UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/3 "2023-11-09T08:47:56Z")

</div>

Hi @Joyce  
Thanks for your response.  
I have the editor url set in that environment variable, but it still doesn’t work

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [November 9, 2023, 9:51am UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/4 "2023-11-09T09:51:28Z")

</div>

Mmm ok. I don’t understand how Sendgrid is getting the URL of your homepage in its email then 😕

If you hover over the URL in the email, do you see the editor URL or the homepage URL? (Trying to figure out if the editor URL could be redirecting to your published homepage. Not sure how that could happen but worth checking!)

I haven’t setup the Xano / Sendgrid combo in a while. Is there any chance you had your homepage there before and need to publish the change of the environment variable in Xano before it takes effect?

I know they added that a while back to changes made on API calls, not sure if they did the same for extensions.

---

<div class="post-metadata">

**Author:** ![Adam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/adam/32/9449_2.png) [@Adam](https://community.weweb.io/u/Adam)\
**Post date:** [November 9, 2023, 10:08am UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/5 "2023-11-09T10:08:14Z")

</div>

@Joyce  
The url they send in the email is encoded.

I don’t believe there is an option to publish changes to environment variables in Xano, rather changing them should have an immediate effect.

---

<div class="post-metadata">

**Author:** ![polina\_cigen](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@polina\_cigen](https://community.weweb.io/u/polina_cigen)\
**Post date:** [December 22, 2023, 3:33pm UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/7 "2023-12-22T15:33:30Z")

</div>

Hi Adam, were you able to solve it? I have the same issue ☹

---

<div class="post-metadata">

**Author:** ![polina\_cigen](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@polina\_cigen](https://community.weweb.io/u/polina_cigen)\
**Post date:** [December 22, 2023, 6:16pm UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/8 "2023-12-22T18:16:50Z")

</div>

I’ve fixed this myself. The issue was on the Xano side. In their “generate\_magic\_link” function the “magic\_link\_redirect\_uri” variable was concatenated with the token without any separators, so the resulting link was like `"google.comey123456"`, where `"ey123456"` is a jwt token. I’ve added “?token=” between link and token, so the result is like `"google.com?token=ey123456"`.

 ![Screenshot 2023-12-22 at 18.12.58](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/650daf5f981408b23258e448029e7c92fdb2afc6.png)

I hope it will help others!  
P.S. When I installed Xano sniipet there was no “update\_password” endpoint, so I had to create one myself too 🙄

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [December 26, 2023, 9:17am UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/9 "2023-12-26T09:17:01Z")

</div>

Nicely done @polina_cigen! Thanks so much for taking the time to share the solution on here as well. Really appreciate it 🙂

---

<div class="post-metadata">

**Author:** ![eberi](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@eberi](https://community.weweb.io/u/eberi)\
**Post date:** [November 17, 2024, 5:33pm UTC](https://community.weweb.io/t/editor-redirect-link-issues-reset-password-using-xano-sendgrid-magic-link/5276/10 "2024-11-17T17:33:52Z")

</div>

Thanks, that helped me a lot.  
@Joyce this should really be included in the [password reset tutorial](https://docs.weweb.io/plugins/auth-systems/xano-auth.html#forgot-password-with-xano-auth)
