tenneo-auth-plugin 0.1.10 → 0.1.11

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
@@ -2961,9 +2961,9 @@ function AuthProvider({
2961
2961
  };
2962
2962
  }, [resolvedTenantKey, appId, storageAdapter]);
2963
2963
  react.useEffect(() => {
2964
- const resolvedTenantKey2 = tenantCode ?? Config.getClientCode();
2964
+ const resolvedTenantKey2 = mergedTenantCode ?? Config.getClientCode();
2965
2965
  logger.debug("[AuthProvider] Props from host app", {
2966
- tenantCode: tenantCode ?? "(not provided)",
2966
+ tenantCode: mergedTenantCode ?? "(not provided)",
2967
2967
  appId: appId ?? "",
2968
2968
  resolvedTenantKey: resolvedTenantKey2
2969
2969
  });
@@ -3011,7 +3011,7 @@ function AuthProvider({
3011
3011
  } else {
3012
3012
  logger.debug("[AuthProvider] No tenant code determined");
3013
3013
  }
3014
- }, [tenantCode, appId]);
3014
+ }, [mergedTenantCode, appId]);
3015
3015
  const [state, setState] = react.useState({
3016
3016
  isAuthenticated: false,
3017
3017
  accessToken: null,
@@ -3075,7 +3075,7 @@ function AuthProvider({
3075
3075
  return () => {
3076
3076
  cancelled = true;
3077
3077
  };
3078
- }, [autoInit, tenantCode, syncAuthState]);
3078
+ }, [autoInit, mergedTenantCode, syncAuthState]);
3079
3079
  react.useEffect(() => {
3080
3080
  if (!autoInit) {
3081
3081
  setState((prev) => ({ ...prev, isLoading: false }));
@@ -3119,7 +3119,7 @@ function AuthProvider({
3119
3119
  stopCookieWatcher();
3120
3120
  setState((prev) => ({ ...prev, isLoading: true }));
3121
3121
  try {
3122
- await engineRef.current?.logout({ tenantKey: tenantCode });
3122
+ await engineRef.current?.logout({ tenantKey: mergedTenantCode });
3123
3123
  resetCookieWatcher();
3124
3124
  } finally {
3125
3125
  stopStorageWatcher();
@@ -3131,7 +3131,7 @@ function AuthProvider({
3131
3131
  error: null
3132
3132
  });
3133
3133
  }
3134
- }, [tenantCode]);
3134
+ }, [mergedTenantCode]);
3135
3135
  const refreshToken = react.useCallback(async () => {
3136
3136
  try {
3137
3137
  const newToken = await engineRef.current?.refresh() ?? "";