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); + } }