academe-kit 0.7.2 → 0.7.4

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.esm.js CHANGED
@@ -6099,8 +6099,6 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
6099
6099
  const isLoading = auth.isLoading;
6100
6100
  const activeNavigator = auth.activeNavigator;
6101
6101
  const userProfile = auth.user?.profile;
6102
- console.log(">> isAuthenticated:", isAuthenticated);
6103
- console.log(">> accessToken:", accessToken);
6104
6102
  const currentTokenRef = useRef(undefined);
6105
6103
  // Efeito para sincronizar o token do auth com o state
6106
6104
  // e também verificar cookies periodicamente
@@ -6310,6 +6308,16 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
6310
6308
  const signOut = useCallback(() => {
6311
6309
  console.log("[KC LOGOUT!]");
6312
6310
  setCurrentUser(null);
6311
+ setAccessToken(undefined);
6312
+ // Limpar cookie KC_FORCE_AUTH_TOKEN
6313
+ if (typeof window !== "undefined") {
6314
+ document.cookie =
6315
+ "KC_FORCE_AUTH_TOKEN=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.academe.com.br; secure; SameSite=None";
6316
+ window.accessToken = undefined;
6317
+ }
6318
+ // Limpar storages de dados OIDC do usuário
6319
+ sessionStorage.clear();
6320
+ localStorage.removeItem(`oidc.user:${auth.settings.authority}:${auth.settings.client_id}`);
6313
6321
  auth.removeUser();
6314
6322
  auth.signoutRedirect({
6315
6323
  id_token_hint: auth.user?.id_token,