JWT token not getting removed from the cookie
I am implementing authentication system using jsonwebtoken and bcryptjs. For backend I am using Nojes + Typescript + Mongodb and for the frontend I am using Nexjs 14. I am basically generating a token a storing it into the cookie when the user is trying to log in. Here you can see my login api.