PricingBlog

How to keep logged in from page to page while in editor?

  • rscott-1202852308627755099

    Bishop

    1 year 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!
  • rscott-1202854052870881280

    Bishop

    1 year 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
    1202854175516401664-Screenshot_2024-02-01_at_11.52.27_PM.png
  • rscott-1202854535110856715

    Bishop

    1 year 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.
  • 1202854569026134107-Screenshot_2024-02-01_at_11.54.33_PM.png
  • rscott-1202855353641861160

    Bishop

    1 year 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.
    1202855353448931328-Screenshot_2024-02-01_at_11.57.11_PM.png
  • lucasg-1202866179291746314

    Lucas G

    1 year ago

    Do you have the toddle extension installed
  • rscott-1202875992306225172

    Bishop

    1 year 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_f-1202876358829805598

    Stockton

    1 year 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... 🤷‍♂️
  • lucasg-1202876966663880784

    Lucas G

    1 year ago

    He's setting it manually at the moment but I did see that it is set as a string. Does that matter?
  • stockton_f-1202877857513078864

    Stockton

    1 year ago

    Great question. Not entirely sure. Worth a shot to test it out.