@multiplatform.one/keycloak 0.3.21 → 0.3.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/keycloak",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "keycloak client for multiplatform.one ecosystem",
5
5
  "main": "dist/lib",
6
6
  "module": "dist/esm",
@@ -54,7 +54,7 @@ export function Authenticated({ children, disabled, loginRoute, loggedOutCompone
54
54
  }, [authenticated]);
55
55
 
56
56
  if (disabled || authenticated) return <>{children}</>;
57
- const LoggedOutComponent = loggedOutComponent || (() => <>{authState.debug ? 'not authenticated' : null}</>);
57
+ const LoggedOutComponent = loggedOutComponent || (() => <>{authConfig.debug ? 'not authenticated' : null}</>);
58
58
  return <LoggedOutComponent />;
59
59
  }
60
60
 
package/src/authConfig.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * File Created: 08-11-2022 09:21:15
5
5
  * Author: Clay Risser
6
6
  * -----
7
- * Last Modified: 14-05-2023 01:22:15
7
+ * Last Modified: 26-05-2023 08:07:00
8
8
  * Modified By: Clay Risser
9
9
  * -----
10
10
  * Risser Labs LLC (c) Copyright 2021 - 2022
@@ -73,12 +73,22 @@ export const AuthProvider: FC<AuthProviderProps> = ({
73
73
  const authConfig = useMemo(
74
74
  () => ({
75
75
  ...defaultAuthConfig,
76
- debug,
77
- ensureFreshness,
78
- loginRoute,
79
- messageHandlerKeys,
80
- persist: !tokensFromState && !tokensFromQuery && cookies && ssr ? false : persist,
81
- ssr: !tokensFromState && !tokensFromQuery && cookies ? ssr : false,
76
+ ...(typeof debug !== 'undefined' ? { debug } : {}),
77
+ ...(typeof ensureFreshness !== 'undefined' ? { ensureFreshness } : {}),
78
+ ...(typeof loginRoute !== 'undefined' ? { loginRoute } : {}),
79
+ ...(typeof messageHandlerKeys !== 'undefined' ? { messageHandlerKeys } : {}),
80
+ persist:
81
+ !tokensFromState && !tokensFromQuery && cookies && ssr
82
+ ? false
83
+ : typeof persist !== 'undefined'
84
+ ? persist
85
+ : defaultAuthConfig.persist,
86
+ ssr:
87
+ !tokensFromState && !tokensFromQuery && cookies
88
+ ? typeof ssr !== 'undefined'
89
+ ? ssr
90
+ : defaultAuthConfig.ssr
91
+ : false,
82
92
  }),
83
93
  [debug, ensureFreshness, loginRoute, messageHandlerKeys, persist, ssr],
84
94
  );
@@ -4,7 +4,7 @@
4
4
  * File Created: 22-11-2022 17:40:53
5
5
  * Author: Clay Risser
6
6
  * -----
7
- * Last Modified: 13-05-2023 03:59:54
7
+ * Last Modified: 26-05-2023 07:31:04
8
8
  * Modified By: Clay Risser
9
9
  * -----
10
10
  * Risser Labs LLC (c) Copyright 2021 - 2022