How to save an auth cookie in postman?

  cookies, javascript, jwt, node.js, postman

I have a route /login where I send username and password, if the credentials match I will receive a cookie with a jwt accesstoken like this:

    res.cookie("auth-token", accessToken, {
      httpOnly: true,
      secure: true,
      sameSite: true,
    });

Now the cookie doesn’t persist because whenever I try to access a private route, I get a response where it says that I’m not authenticated. How can I make the cookie persist? I am using the postman native app.

Source: Ask Javascript Questions

LEAVE A COMMENT