From eaba16de965f913422d1412e14a9b330d523b5f2 Mon Sep 17 00:00:00 2001 From: Yathindra Date: Mon, 2 May 2022 09:35:12 +0530 Subject: [PATCH] replace handleSignOutSuccessful --- lib/src/client.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/client.ts b/lib/src/client.ts index b0cceedb..30276935 100644 --- a/lib/src/client.ts +++ b/lib/src/client.ts @@ -61,6 +61,7 @@ export class AsgardeoAuthClient { private _authenticationCore: AuthenticationCore; private static _instanceID: number; + static _authenticationCore: any; /** * This is the constructor method that returns an instance of the . @@ -84,6 +85,7 @@ export class AsgardeoAuthClient { } this._dataLayer = new DataLayer(`instance_${AsgardeoAuthClient._instanceID}`, store); this._authenticationCore = new AuthenticationCore(this._dataLayer, cryptoUtils); + AsgardeoAuthClient._authenticationCore = new AuthenticationCore(this._dataLayer, cryptoUtils); } /** @@ -570,12 +572,6 @@ export class AsgardeoAuthClient { return stateParam ? stateParam === SIGN_OUT_SUCCESS_PARAM && !error : false; } - public async handleSignOutSuccessful(signOutRedirectURL: string, userID?: string) { - if(AsgardeoAuthClient.isSignOutSuccessful(signOutRedirectURL)) { - await this._authenticationCore.clearUserSessionData(userID); - } - } - /** * This method returns if the sign-out has failed or not. * @@ -624,4 +620,8 @@ export class AsgardeoAuthClient { public async updateConfig(config: Partial>): Promise { await this._authenticationCore.updateConfig(config); } + + public static async clearUserSessionData(userID?: string): Promise { + await this._authenticationCore.clearUserSessionData(userID); + } }