PricingBlog

Why does login /auth/me / session cookies not work?

  • rscott-1207775588606287955

    Bishop

    1 year ago

    I cannot figure this out for the life of me.

    Sometimes login and auth/me work fine. Now for some reason auth/me is returning 'authorization required'. Of course its required, this is what I've been doing all the time, why is it not working now?

    There is another person working on the site with me and they might be logging into this account you see me logging into as well. But I tried a second account and that doesn't work either.

    /auth/login is showing its working on this video, and on xano.

    /auth/me is showing failure 'authorization required'

    So it appears that /auth/login maybe is not writing the session variable? Why would it do this?
  • lucasg-1207776965524856895

    Lucas G

    1 year ago

    You've always had to open up a preview page (the branch's toddle.site URL) and login there
  • The extension then takes the auth token and feeds it back to the editor
  • When you login, go back into the editor and hit refresh and it should work
  • rscott-1207780432431812659

    Bishop

    1 year ago

    yeah I have been trying that
  • rscott-1207781550935117854

    Bishop

    1 year ago

    all of this doesn't make sense
  • rscott-1207782138968154162

    Bishop

    1 year ago

  • rscott-1207787805963460748

    Bishop

    1 year ago

    all this stuff started happenign to us when we published
  • before then it worked fine
  • lucasg-1207794383693287424

    Lucas G

    1 year ago

    The Team toddle might have to investigate the setup
  • andreasmoller-1207795025522593872

    Andreas Møller

    1 year ago

    Hi Bishop I would love to try and help
    Can you invite me to the project "andreas" and DM me credentials I can use to log in.
  • rscott-1207808616761925713

    Bishop

    1 year ago

    Thanks.. you were invited and the credentials are on the /login page already filled out. I took out all of the Go To Page /login that i could find since it was impossible to work with it since /auth/me returned nothing or error.

    If you want to see xano let me know, but there's nothing new going on there
  • andreasmoller-1207996553516687421

    Andreas Møller

    1 year ago

    👍
  • rscott-1208079030432305222

    Bishop

    1 year ago

    So what I'm wondering is the relationships with components and /auth/me or the results of /auth/me called in the main page, does the component have access to that information? i'm seeing one of my sub-sub components not have the answer for user_id from /auth/me - its coming up blank. Maybe I'm missing something
  • rscott-1208079968307908729

    Bishop

    1 year ago

    I can't understand what I'm doing wrong here. Why does auth/me continue to return 'null' or 'authorization required' in this component
  • and why does it do it only in the test version in new tab and not the local version
  • rscott-1208080718169903104

    Bishop

    1 year ago

    inconsistent between edit version and live
  • rscott-1208087224613339216

    Bishop

    1 year ago

    I guess I could just pass user ID down the chain to the sub components via attributes instead of asking the api for the information or assuming it's accessible.

    My assumption it'll be available is possibly just incorrect however I think it's important to give us developers clarity on this topic
  • rscott-1208116220348334080

    Bishop

    1 year ago

    We got it all working again, not using /auth/me as much just passing the user_id from page to component. it was working.

    We published it, entered the new published project, the /auth/login is returning NULL? what the heck
  • rscott-1208116653158834286

    Bishop

    1 year ago

    but it was not 'null' on xano.

    There's something going on between toddle and xano
    1208116652877553734-Screenshot_2024-02-16_at_12.23.51_PM.png
  • rscott-1208117071569887262

    Bishop

    1 year ago

    this says NULL, but XANO says it returned the value
    1208117071355846767-Screenshot_2024-02-16_at_12.25.42_PM.png
  • rscott-1208153953142046771

    Bishop

    1 year ago

    it seems like perhaps a lot of shift reloading it necessary and can't really use /auth/me very much at all.