I am trying to set up Magic Link through Xano and SendGrid. I’ve got everything working but I have to get one final piece of the puzzle set up. I need to be able to extract the magic token from the user’s URL, and then can exchange that for an auth token with Xano.
Here’s an example of what the URL looks like:
https://www.goaloe.app/magic-link-auth?token=EBhgaAGERk123akadASFDKJWL.KAJAFS834;LJ43T9KaADFAS;A;-0A;KLSDFJC9ADEFNDSA;a0d9.aksfdASDJkA;SLDJKN32ASD.DZTCo1Tm2W3bBwbxOOoLWrtID11qj_fSUD0LcM-BlikKJ;A3NADFAAN44kDFNDSJNQKNKNnadsJEW443Kndasfl;khG47xc4._kafdsKASDFNkNDFKJkan;9834t7JAFDkd3KDk3KANnRnALPHs
Here’s the javascript code I have tried to get the token, but it’s not working:
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const token= urlParams.get(‘token’)
return token
I’d love some help! Thank you!