change api check
This commit is contained in:
@@ -197,6 +197,6 @@ export class AuthSessionService {
|
|||||||
return;
|
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`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,16 +279,12 @@ export class FastcheckPage {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const id = this.partnerId() || this.defaultPartnerId;
|
const id = this.partnerId() || this.defaultPartnerId;
|
||||||
const sessionId = this.authSession.getSessionId();
|
// Validate any stored session (cookie) with the server first.
|
||||||
|
// If there's no valid stored session — open the auth dialog to create one.
|
||||||
if (!sessionId) {
|
this.authSession.validateStoredSession().subscribe({
|
||||||
this.openAuth('new');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.authSession.validateSession(sessionId).subscribe({
|
|
||||||
next: (response) => {
|
next: (response) => {
|
||||||
if (!response) {
|
const sessionId = this.authSession.getSessionId();
|
||||||
|
if (!sessionId) {
|
||||||
this.openAuth('new');
|
this.openAuth('new');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user