I am trying to set refresh token in different path in cookies. so that it will not send back to the server for every client request.
the following code what I tried to set different path when creating refresh token
private void SetRefreshToken(RefreshToken newRefreshToken)
{
var cookieOptions = new CookieOptions
{
HttpOnly = true,
Path = "/user/",
Expires = newRefreshToken.ExpiredTime
};
Response.Cookies.Append("refreshToken", newRefreshToken.Token, cookieOptions);
userAuth.RefreshToken = newRefreshToken.Token;
userAuth.TokenCreated = newRefreshToken.CreatedTime;
userAuth.TokenExpired = newRefreshToken.ExpiredTime;
}
If I don't set any path, I can see it in the browser -> Inspect -> Application -> cookies
, I know this is default path. But if I set path, I cannot see the refresh token. it's totally empty