change api check

This commit is contained in:
sdarbinyan
2026-06-01 02:15:38 +04:00
parent 7c7cdf8da2
commit bc174f7cba
2 changed files with 6 additions and 10 deletions

View File

@@ -197,6 +197,6 @@ export class AuthSessionService {
return;
}
document.cookie = `${this.cookieName}=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax`;
// document.cookie = `${this.cookieName}=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax`;
}
}

View File

@@ -279,16 +279,12 @@ export class FastcheckPage {
event.preventDefault();
const id = this.partnerId() || this.defaultPartnerId;
const sessionId = this.authSession.getSessionId();
if (!sessionId) {
this.openAuth('new');
return;
}
this.authSession.validateSession(sessionId).subscribe({
// Validate any stored session (cookie) with the server first.
// If there's no valid stored session — open the auth dialog to create one.
this.authSession.validateStoredSession().subscribe({
next: (response) => {
if (!response) {
const sessionId = this.authSession.getSessionId();
if (!sessionId) {
this.openAuth('new');
return;
}