Open kunalrisaanva opened 9 months ago
not working in what sense? is the cookie not sent by the server or you are unable to see it in postman
if you are not able to see it in postman:
not working in what sense? is the cookie not sent by the server or you are unable to see it in postman
if you are not able to see it in postman:
- check the cookies either in header section or
- click on cookie text below send button
In options when i did cookie secure option true it will not set and when i did this secure option commented cookie are set and seeing in postman. So the problem is in options httpOnly working secure true not working
Sometimes, servers might set cookies with specific attributes (like HttpOnly or Secure) that prevent them from being accessed by client-side JavaScript. These cookies won't be visible in the "Cookies" section of Postman.
So try accessing cookies
either in header
or below the send
button in postman, without commenting secure options
Sometimes, servers might set cookies with specific attributes (like HttpOnly or Secure) that prevent them from being accessed by client-side JavaScript. These cookies won't be visible in the "Cookies" section of Postman.
So try accessing
cookies
either inheader
or below thesend
button in postman, without commentingsecure options
if that prevent them from being accessed by client-side JavaScript. then how it accessed by in video. in that video cookies are visible in postman of hitesh sir
not working in what sense? is the cookie not sent by the server or you are unable to see it in postman if you are not able to see it in postman:
- check the cookies either in header section or
- click on cookie text below send button
In options when i did cookie secure option true it will not set and when i did this secure option commented cookie are set and seeing in postman. So the problem is in options httpOnly working secure true not working
Are you getting 'undefined'? If yes then check if you are awaiting before destructuring the tokens from generateTokens
function
const { accessToken, refershToken } = await generateTokens()
not working in what sense? is the cookie not sent by the server or you are unable to see it in postman if you are not able to see it in postman:
- check the cookies either in header section or
- click on cookie text below send button
In options when i did cookie secure option true it will not set and when i did this secure option commented cookie are set and seeing in postman. So the problem is in options httpOnly working secure true not working
Are you getting 'undefined'? If yes then check if you are awaiting before destructuring the tokens from
generateTokens
functionconst { accessToken, refershToken } = await generateTokens()
Tokens are genrated properly. But with secure true option they are not getting in postman so the problem is secure true option not working
not working in what sense? is the cookie not sent by the server or you are unable to see it in postman if you are not able to see it in postman:
- check the cookies either in header section or
- click on cookie text below send button
In options when i did cookie secure option true it will not set and when i did this secure option commented cookie are set and seeing in postman. So the problem is in options httpOnly working secure true not working
Are you getting 'undefined'? If yes then check if you are awaiting before destructuring the tokens from
generateTokens
functionconst { accessToken, refershToken } = await generateTokens()
Tokens are genrated properly. But with secure true option they are not getting in postman so the problem is secure true option not working
I didn't encounter that problem 🤔
Check both tokens before sending response
Check both tokens before sending response They are created properly they are received from func
Share your repo link
Share your repo link
Check my profile link will be there
I have solved the issue, please reply if you still need help
Guys but in thunderClient the cookies are visible and also secure is set to true;
I have solved the issue, please reply if you still need help
@aakash6789 can you look into the issue 88?
I have solved the issue, please reply if you still need help
I figured out secure true options required https protocol not http
I have solved the issue, please reply if you still need help
@aakash6789 can you look into the issue 88?
@SaunakNandi the catch is that accessToken and refreshToken are returned as promises, so to set them first you need to reolve them. Try this if you are unable to solve the issue, you can always check my repo
.cookie("accessToken", accesToken, options) .cookie("refreshToken", refreshToken, options)
In cookie options secure:true not working what should i do