File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/@wix-astro/src/components Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 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 type { WixClient } from '@wix/sdk';
287
+ import type { SiteSessionAuth } from "@wix/sdk/auth/site-session";
286
288
287
289
class LoginForm extends HTMLElement {
288
290
constructor() {
478
480
response.sessionToken!
479
481
);
480
482
483
+ // Update context
484
+ (wixContext['client'] as WixClient<undefined, ReturnType<typeof SiteSessionAuth>>).auth.setTokens(tokens.tokens);
485
+
481
486
// Set cookie
482
487
this.setCookie('wixSession', JSON.stringify(tokens), 2);
483
488
You can’t perform that action at this time.
0 commit comments