academe-kit 0.3.6 → 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,7 +4948,9 @@ 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);
@@ -4971,7 +4973,6 @@ const SecurityContext = React2.createContext({
4971
4973
  services: null,
4972
4974
  accessToken: undefined,
4973
4975
  });
4974
- console.log("hey!!");
4975
4976
  // Função pura fora do componente - sem re-criação
4976
4977
  const decodeAccessToken = (token) => {
4977
4978
  if (!token)
@@ -5027,10 +5028,14 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
5027
5028
  return request;
5028
5029
  },
5029
5030
  });
5030
- window.accessToken = accessToken;
5031
+ if (typeof window !== "undefined") {
5032
+ window.accessToken = accessToken;
5033
+ }
5031
5034
  }
5032
5035
  else {
5033
- window.accessToken = undefined;
5036
+ if (typeof window !== "undefined") {
5037
+ window.accessToken = undefined;
5038
+ }
5034
5039
  }
5035
5040
  }, [accessToken, apiClient]);
5036
5041
  // --- 3. Helpers de Usuário e Roles ---
@@ -8350,6 +8355,12 @@ exports.APPLICATIONS_ROLES = void 0;
8350
8355
  APPLICATIONS_ROLES["ACCESS_MIKE"] = "Acesso mike";
8351
8356
  APPLICATIONS_ROLES["VIEW_WIDGET"] = "Visualizar Widget";
8352
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 = {}));
8353
8364
 
8354
8365
  var index = /*#__PURE__*/Object.freeze({
8355
8366
  __proto__: null