#fun with jwt
1 messages · Page 1 of 1 (latest)
Hi @marble ridge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the knowledge sources provided, it seems that there have been issues reported with setting cookies in Astro. In one case, a user reported that the Astro.cookies.set() method was not saving its value (source (https://github.com/withastro/astro/issues/5938)).
In another case, a user reported that Astro.request.headers.get('cookie') was always null, even though the cookie was being set and could be seen in the browser (source (https://github.com/withastro/astro/issues/3018)).
One solution suggested was to ensure that you have the node adapter and have the output target set to server. Also, it was mentioned that Astro.cookies only works in Astro pages (i.e., Astro files inside the /pages directory) (source (https://github.com/withastro/astro/issues/5938)).
Another solution suggested was to manually set the path to / when setting the cookie to make it available across the website (source (https://github.com/withastro/astro/issues/9969)).