PricingBlog

cookies login/auth inside a component

  • rscott-1199533488995565688

    Bishop

    1 year ago

    I'm logging my user in inside a component and assigning the auth_token but how then do i inform the rest of the single page app to refresh itself?

    auth/me just doesn't seem to be sticking. i reload the page, and auth/me continues to fail despite setting the auth token. I'm not sure if this is because its assigned in a component or some other reason.
  • rscott-1199562051459240046

    Bishop

    1 year ago

    ok it looks like my problem is that i am doing login on the same page as the rest of my app and the app and login section both load. i need to refresh the app somehow after the auth token is set.

    seems like it'll be easier just to put login on its own page. :/
  • lucasg-1199562946817298612

    Lucas G

    1 year ago

    Don't most login modals refresh pages? Doesn't sound too bad
  • rscott-1199563431062290492

    Bishop

    1 year ago

    yeah
  • Tod-1199563433826320444

    Tod

    1 year ago

    Great energy @Bishop! Your continuous contribution to the toddle Community just made you advance to Community Level 6!
  • rscott-1199563452117680269

    Bishop

    1 year ago

    thanks for talking sense into me
  • lucasg-1199563672742269068

    Lucas G

    1 year ago

    return the favor when it happens to me
  • 😂