@wix/astro 0.3.1 → 0.3.3
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.
|
@@ -283,6 +283,8 @@
|
|
|
283
283
|
import { authentication, verification, recovery } from '@wix/identity';
|
|
284
284
|
import { getMemberTokensForDirectLogin } from './login-helpers/login-helpers.js';
|
|
285
285
|
import { wixContext } from '@wix/sdk-context';
|
|
286
|
+
import { getAuth } from '@wix/astro/runtime/client';
|
|
287
|
+
|
|
286
288
|
import type { WixClient } from '@wix/sdk';
|
|
287
289
|
import type { SiteSessionAuth } from "@wix/sdk/auth/site-session";
|
|
288
290
|
|
|
@@ -483,9 +485,15 @@
|
|
|
483
485
|
// Update context
|
|
484
486
|
(wixContext['client'] as WixClient<undefined, ReturnType<typeof SiteSessionAuth>>).auth.setTokens(tokens.tokens);
|
|
485
487
|
|
|
488
|
+
localStorage.removeItem('wixRedirectSessionLastPreWarm');
|
|
489
|
+
await getAuth().syncToWixPages();
|
|
490
|
+
|
|
486
491
|
// Set cookie
|
|
487
492
|
this.setCookie('wixSession', JSON.stringify(tokens), 2);
|
|
488
493
|
|
|
494
|
+
// Reset loading state before exiting
|
|
495
|
+
this.loading = false;
|
|
496
|
+
|
|
489
497
|
// Show success animation
|
|
490
498
|
this.showSuccessMessage();
|
|
491
499
|
|