@usecapsule/user-management-client
Advanced tools
Comparing version 0.11.0-test to 0.11.0-test-1
@@ -17,3 +17,3 @@ import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponseHeaders } from 'axios'; | ||
opts?: ConfigOpts | ||
retrieveSessionCookie?: () => string | ||
retrieveSessionCookie?: () => string | undefined | ||
persistSessionCookie?: (cookie: string) => void | ||
@@ -148,3 +148,3 @@ } | ||
if (retrieveSessionCookie) { | ||
if (headers['Cookie']) { | ||
if (headers?.['Cookie']) { | ||
delete headers['Cookie']; | ||
@@ -163,7 +163,7 @@ } | ||
if (persistSessionCookie) { | ||
if (headers['set-cookie']?.length > 0) { | ||
if (headers?.['set-cookie']?.length > 0) { | ||
delete headers['set-cookie']; | ||
} | ||
if (headers[SESSION_COOKIE_HEADER_NAME]) { | ||
if (headers?.[SESSION_COOKIE_HEADER_NAME]) { | ||
persistSessionCookie(headers[SESSION_COOKIE_HEADER_NAME]); | ||
@@ -170,0 +170,0 @@ } |
@@ -11,3 +11,3 @@ export declare const USER_NOT_VERIFIED = "user must verify biometrics"; | ||
opts?: ConfigOpts; | ||
retrieveSessionCookie?: () => string; | ||
retrieveSessionCookie?: () => string | undefined; | ||
persistSessionCookie?: (cookie: string) => void; | ||
@@ -14,0 +14,0 @@ }; |
@@ -376,3 +376,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
if (retrieveSessionCookie) { | ||
if (headers['Cookie']) { | ||
if (headers === null || headers === void 0 ? void 0 : headers['Cookie']) { | ||
delete headers['Cookie']; | ||
@@ -390,6 +390,6 @@ } | ||
if (persistSessionCookie) { | ||
if (((_a = headers['set-cookie']) === null || _a === void 0 ? void 0 : _a.length) > 0) { | ||
if (((_a = headers === null || headers === void 0 ? void 0 : headers['set-cookie']) === null || _a === void 0 ? void 0 : _a.length) > 0) { | ||
delete headers['set-cookie']; | ||
} | ||
if (headers[SESSION_COOKIE_HEADER_NAME]) { | ||
if (headers === null || headers === void 0 ? void 0 : headers[SESSION_COOKIE_HEADER_NAME]) { | ||
persistSessionCookie(headers[SESSION_COOKIE_HEADER_NAME]); | ||
@@ -396,0 +396,0 @@ } |
{ | ||
"name": "@usecapsule/user-management-client", | ||
"version": "0.11.0-test", | ||
"version": "0.11.0-test-1", | ||
"main": "dist/client.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/client.d.ts", |
Sorry, the diff of this file is not supported yet
68036