@thunderid/browser 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ThunderIDBrowserClient.d.ts.map +1 -1
- package/dist/cjs/index.cjs +14 -8
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2779,21 +2779,27 @@ var ThunderIDBrowserClient = class ThunderIDBrowserClient extends ThunderIDJavaS
|
|
|
2779
2779
|
afterSignOut = afterSignOutParam;
|
|
2780
2780
|
}
|
|
2781
2781
|
const config = await this.getStorageManager().getConfigData();
|
|
2782
|
+
let signOutUrl = "";
|
|
2782
2783
|
if (config?.rpInitiatedLogout !== false) {
|
|
2783
|
-
|
|
2784
|
+
signOutUrl = sessionId ? "" : SPAUtils_default.getSignOutUrl(config.clientId, this._browserInstanceId);
|
|
2784
2785
|
if (!signOutUrl) try {
|
|
2785
2786
|
signOutUrl = await this.getSignOutUrl(sessionId);
|
|
2786
2787
|
} catch (error) {
|
|
2787
2788
|
logger$2.debug("Could not build the RP-initiated logout URL; falling back to a local sign out.", error);
|
|
2788
2789
|
signOutUrl = "";
|
|
2789
2790
|
}
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2791
|
+
}
|
|
2792
|
+
if (config?.tokenLifecycle?.revokeToken?.revokeOnSignOut === true) try {
|
|
2793
|
+
await this.requestAccessTokenRevocation(sessionId);
|
|
2794
|
+
} catch (error) {
|
|
2795
|
+
logger$2.debug("Could not revoke the access token before signing out.", error);
|
|
2796
|
+
}
|
|
2797
|
+
if (signOutUrl) {
|
|
2798
|
+
await this.clearSessionAsync(sessionId);
|
|
2799
|
+
afterSignOut?.(signOutUrl);
|
|
2800
|
+
location.href = signOutUrl;
|
|
2801
|
+
await SPAUtils_default.waitTillPageRedirect();
|
|
2802
|
+
return signOutUrl;
|
|
2797
2803
|
}
|
|
2798
2804
|
this.clearSession(sessionId);
|
|
2799
2805
|
if (config?.signInUrl) navigate_default(config.signInUrl);
|