academe-kit 0.3.5 → 0.3.7

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.js CHANGED
@@ -4948,11 +4948,14 @@ const AcademeAuthProvider = ({ realm, hubUrl, children, clientId, keycloakUrl, a
4948
4948
  const oidcConfig = {
4949
4949
  authority: `${keycloakUrl}/realms/${realm}`,
4950
4950
  client_id: clientId,
4951
- redirect_uri: window.location.href,
4951
+ redirect_uri: typeof window !== "undefined"
4952
+ ? window.location.origin
4953
+ : process.env.NEXT_PUBLIC_REDIRECT_URI,
4952
4954
  scope: "openid profile email",
4953
4955
  onSigninCallback: () => {
4954
4956
  window.history.replaceState({}, document.title, window.location.pathname);
4955
4957
  },
4958
+ automaticSilentRenew: true,
4956
4959
  };
4957
4960
  return (jsxRuntime.jsx(AuthProvider, { ...oidcConfig, children: jsxRuntime.jsx(SecurityProvider, { hubUrl: hubUrl, apiBaseUrl: apiBaseUrl, skipApiUserFetch: skipApiUserFetch, children: children }) }));
4958
4961
  };
@@ -5025,10 +5028,14 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
5025
5028
  return request;
5026
5029
  },
5027
5030
  });
5028
- window.accessToken = accessToken;
5031
+ if (typeof window !== "undefined") {
5032
+ window.accessToken = accessToken;
5033
+ }
5029
5034
  }
5030
5035
  else {
5031
- window.accessToken = undefined;
5036
+ if (typeof window !== "undefined") {
5037
+ window.accessToken = undefined;
5038
+ }
5032
5039
  }
5033
5040
  }, [accessToken, apiClient]);
5034
5041
  // --- 3. Helpers de Usuário e Roles ---
@@ -8348,6 +8355,12 @@ exports.APPLICATIONS_ROLES = void 0;
8348
8355
  APPLICATIONS_ROLES["ACCESS_MIKE"] = "Acesso mike";
8349
8356
  APPLICATIONS_ROLES["VIEW_WIDGET"] = "Visualizar Widget";
8350
8357
  })(exports.APPLICATIONS_ROLES || (exports.APPLICATIONS_ROLES = {}));
8358
+ exports.MIKE_ROLES = void 0;
8359
+ (function (MIKE_ROLES) {
8360
+ MIKE_ROLES["ACCESS_ROLEPLAY"] = "Acesso roleplay";
8361
+ MIKE_ROLES["ACCESS_JOURNEYS"] = "Acesso jornadas";
8362
+ MIKE_ROLES["ACCESS_FREEPLAY"] = "Acesso freeplay";
8363
+ })(exports.MIKE_ROLES || (exports.MIKE_ROLES = {}));
8351
8364
 
8352
8365
  var index = /*#__PURE__*/Object.freeze({
8353
8366
  __proto__: null