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

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.

Hi @Adam :wave:

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:

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!

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

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

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.

@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.

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

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".

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 :roll_eyes:

1 Like

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

1 Like