Login on Xano using Magic Link from Sendgrid

Hello Weweb folks !

How are you doing ?? :slight_smile:

I’m looking to enable login on Xano using Magic link from Sendgrip.

The generated magic link I get from Xano is not return as expected from what I got to see on the Video tutorial or from the posts on the forum : it’s should have a paramater called ?token in the url, which I don’t get back from the response.

Of course, I get a 404 then since this page doesn’t exists on the app :sweat_smile:


Here is a quick example of this :

Do you have any idea how to fix it ?

I got from the posts in the community that from this URL I’ll have to parse the token using the query parameters, which will then be used on my authentication process to logging the user.

Let me know if I can be more usefull in explaning my case.

Thank you very much for your help !

Hi, I see two solutions

  1. You find out how to make xano/sendgrid build the correct url (as you said, should be ?token=something)
  2. You create a page on WeWeb to handle the magic link, so here it would mean create a page with as path /magic_link/{{token|}}
    Then, on the page you can add a workflow on page load, read the token as it will be available in your data explorer and use it to login with your xano request :slight_smile:

Hello @Alexis !

Thanks for your reply !

I decided to pursue with the option 2 !

About the workflow, I’ve successfully swap the magic_token to the auth_token, the xano request should just be the Fetch User or should I use the Rest API with a POST to get /auth/me endpoint and then redirect ?

I can’t see where I should be passing the auth_token from Xano using the /auth/me endpoint since it doesn’t have an input parameter … any idea ?

Thanks in advance !

You can use the action Store Auth Token, and then call the Fetch Me action :slight_smile: