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