PricingBlog

"access_token" not working with "get Cookie"

  • erickeverything-1290238294772289566

    ерик

    1 year ago

    the cookie doesnt exist but it returns false, i want display content on the page depending if the cookie is set. But i dont want to run an api call, because i dont want to verify the token, that doesnt matter on that page.

    How can i access that access_token?
    1290238294910832700-Bildschirmfoto_2024-09-30_um_13.01.54.png
    1290238295137062984-Bildschirmfoto_2024-09-30_um_13.02.04.png
    1
  • Tod-1290238296873631746

    Tod

    1 year ago

    Great energy @ерик! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • plusmin-1290239332996878436

    Armand

    1 year ago

    You could try to add an actua Null node to the Second in the Equals. It won't create that node, but I see that the null value is now a string, which may explain why the output is not true.

    Not a 100% sure it will make a difference, but worth a try 🙂
  • erickeverything-1290240509473718323

    ерик

    1 year ago

    okay but now i set the cookie and it doesnt equal null anymore, how can that be?
    1290240508978921485-Bildschirmfoto_2024-09-30_um_13.12.42.png
    1290240509301755904-Bildschirmfoto_2024-09-30_um_13.12.52.png
  • plusmin-1290243197301162098

    Armand

    1 year ago

    I am not sure to be honest. I think there are others here who are better equipped to answer that.

    If you just want to check if a user is logged in/authenticated, I generally just do an api call for get user. Perhaps that is useful for you, although I know you said you don't want to do an api call.
  • max.kayr-1290245507406495756

    Max

    1 year ago

    You cannot read the access cookie. It is a http only cookie that cannot be accessed from Javascript. It is a security feature