How to keep logged in from page to page while in editor?
Bishop
2 years ago
I cannot seem to use /auth/me and can't find an example how to use it. I'm getting 'null' in response from xano, and on xano it says I don't have authorization. I recorded the problem, no idea what I am doing wrong here!
Bishop
2 years ago
cookies seem to stick when i test this way instead of via T key which is pretty inconvenient.
yeah, it works but not when I use T or from the editor. Is this normal behavior? It makes testing a bit of a pain, just wondering if its normal
Bishop
2 years ago
I can't set up any functions to use data from /auth/me endpoint if it doesn't work inside the editor. user_id for example, or anything else, they aren't usable if the 'autofetch' doesn't work.
Bishop
2 years ago
and now its working after you seemed to have rebooted the servers or something (was getting 'unable to save' error for a minute) Please tell me whats going on so I don't think I'm losing my mind.
Lucas G
2 years ago
Do you have the toddle extension installed
Bishop
2 years ago
yes. it works now perhaps each new session i need to login to toddle from scratch, i don't know but I'm going to try that
Stockton
2 years ago
In supabase the default duration of the JWT was pretty low if I remember right. You can go into supbase settings and make it last longer. That way you don't have to relogin as frequently.
Looks like your on xano though so scratch that. I don't know them. Perhaps they also have a JWT expiration setting somewhere. Or maybe you manually set that... 🤷♂️
Lucas G
2 years ago
He's setting it manually at the moment but I did see that it is set as a string. Does that matter?
Stockton
2 years ago
Great question. Not entirely sure. Worth a shot to test it out.