PricingBlog

Session Cookies from within a component...

  • mdxwired-1275321671783546910

    mdxwired

    1 year ago

    Hey all. I'm sure this has been addressed, but I could not find it.
    I am using Supabase for Auth and everything is working great, including setting my session cookies so that the auth persists across pages.
    However, I would like to make the login dialog box a component... and have created an experimental version of my login page which does just this. What I cannot figure out is why the session cookies created by the component do not seem to persist. Thoughts?
  • andreasmoller-1275322802164989953

    Andreas Møller

    1 year ago

    Do you mean the session cookies?

    Can you show the workflow where you are setting them?
  • mdxwired-1275324548924833802

    mdxwired

    1 year ago

    Sorry, yes, Session Cookies.
    The 'funny' thing is that I set them in exactly the same 'place' within the component version as I do in the non-component version, as such:
    1275324548719448076-image.png
  • mdxwired-1275324942279245845

    mdxwired

    1 year ago

    in the non-component version they work perfectly. If I run just the component itself, it works perfectly... but if I run the page with the component replacing the standard div... nothing sticks.
  • mdxwired-1275632335508734022

    mdxwired

    1 year ago

    Guess I should have shown the top of that switch. I always check for an empty or Null return first.
  • mdxwired-1275798687964205128

    mdxwired

    1 year ago

    Session Cookies from within a component...