academe-kit 0.7.2 → 0.7.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/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +10 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6312,6 +6312,16 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
|
|
|
6312
6312
|
const signOut = React2.useCallback(() => {
|
|
6313
6313
|
console.log("[KC LOGOUT!]");
|
|
6314
6314
|
setCurrentUser(null);
|
|
6315
|
+
setAccessToken(undefined);
|
|
6316
|
+
// Limpar cookie KC_FORCE_AUTH_TOKEN
|
|
6317
|
+
if (typeof window !== "undefined") {
|
|
6318
|
+
document.cookie =
|
|
6319
|
+
"KC_FORCE_AUTH_TOKEN=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.academe.com.br; secure; SameSite=None";
|
|
6320
|
+
window.accessToken = undefined;
|
|
6321
|
+
}
|
|
6322
|
+
// Limpar storages de dados OIDC do usuário
|
|
6323
|
+
sessionStorage.clear();
|
|
6324
|
+
localStorage.removeItem(`oidc.user:${auth.settings.authority}:${auth.settings.client_id}`);
|
|
6315
6325
|
auth.removeUser();
|
|
6316
6326
|
auth.signoutRedirect({
|
|
6317
6327
|
id_token_hint: auth.user?.id_token,
|