Questions tagged [httponly]

The HttpOnly attribute within the cookie header is used to safeguard data from being accessible by JavaScript.

Retrieve the httponly cookie from NextJS before making a fetch request to an external API

Within my NextJS application, I am utilizing an external API for user authentication and handling other API requests. Specifically, I have integrated a Flask app as the external API. The process involves sending credentials to the API upon login, which the ...

The API is not receiving the HttpOnly cookie

Currently utilizing next.js and strapi for my project. I'm facing an issue with setting an httpOnly cookie between my next.js front-end and my strapi app. Although the cookie is received by the backend, it's not present when I make a request to ...

Creating HTTP-only cookies within a NextJS middleware

Having an issue with updating access token in my middleware when the current one expires; here's my approach: Generate a new token Send it to an API route which adds the token to its response header. The problem arises when the middleware receives t ...

The HTTPOnly cookie is not accessible within the getServerSideProps function in Next.js

Why isn't the jid cookie available in getServerSideProps using Next JS? Here's the scenario: https://i.stack.imgur.com/FLRGk.png The jid cookie is generated by an Expressjs API at https://api-dev.example.com. I'm attempting to retrieve this cookie from a ...