Typescript JsonService Client send request does not contains session cookie

Hi, Im using CustomAuthCredentialsProvider do auth jobs and use JsonServiceClient call apis.

const client = new JsonServiceClient("https://localhost:5001/")
client.credentials = "include";
var authReq = new Authenticate();
authReq.provider = "credentials";
authReq.userName = "admin";
authReq.password = "admin";
authReq.rememberMe = true;
var auth = await client.post(authReq);
var request = new AutoICD10();
this.data = await client.send(request);

First Authenticate api is success, and save session key in redis too.
but i call second AutoICD10 it’s return 401 in IsAuthorized function, how can i fix this?
in my custom auth provider i just check user in database and save it to redis with SessionFeature.GetSessionKey(authService.Request) this key.

in admin page api view it’s work perfectlly but in typescript it’s now work, no cookie in request header.

This doesn’t have anything to do with the TypeScript JsonServiceClient which shares the same cookies as the browser which wont be able to access HttpOnly cookies, but still uses them for API requests.

You also don’t need to set client.credentials which is already pre-configured to include cookies.

Have a look at the HTTP Request / Response Headers which should tell you what cookies and types are being returned. Also inspect the console log for any CORS issues.