abckit 0.0.71 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -213,8 +213,10 @@ export function capacitorClient(opts) {
|
|
|
213
213
|
if (authToken) {
|
|
214
214
|
const prefixStr = Array.isArray(cookiePrefix) ? cookiePrefix[0] : cookiePrefix;
|
|
215
215
|
const prevCookie = (await Preferences.get({ key: normalizedCookieName }))?.value;
|
|
216
|
-
const
|
|
217
|
-
const
|
|
216
|
+
const baseCookieName = `${prefixStr}.session_token`;
|
|
217
|
+
const secureCookieName = `${SECURE_COOKIE_PREFIX}${baseCookieName}`;
|
|
218
|
+
const tokenCookies = `${baseCookieName}=${authToken}, ${secureCookieName}=${authToken}`;
|
|
219
|
+
const newCookie = getSetCookie(tokenCookies, prevCookie ?? void 0);
|
|
218
220
|
if (hasSessionCookieChanged(prevCookie ?? null, newCookie)) {
|
|
219
221
|
await Preferences.set({ key: normalizedCookieName, value: newCookie });
|
|
220
222
|
store?.notify("$sessionSignal");
|