@vaultix.ai/react 0.2.1 → 0.2.2
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 +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -263,7 +263,11 @@ function useAuth() {
|
|
|
263
263
|
const { user, session, isLoaded, isSignedIn, signOut } = useVaultixContext();
|
|
264
264
|
const getToken = (0, import_react2.useCallback)(async () => {
|
|
265
265
|
if (!isSignedIn) return null;
|
|
266
|
-
|
|
266
|
+
try {
|
|
267
|
+
return sessionStorage.getItem("vaultix_jwt");
|
|
268
|
+
} catch {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
267
271
|
}, [isSignedIn]);
|
|
268
272
|
return {
|
|
269
273
|
isLoaded,
|
package/dist/index.mjs
CHANGED
|
@@ -231,7 +231,11 @@ function useAuth() {
|
|
|
231
231
|
const { user, session, isLoaded, isSignedIn, signOut } = useVaultixContext();
|
|
232
232
|
const getToken = useCallback2(async () => {
|
|
233
233
|
if (!isSignedIn) return null;
|
|
234
|
-
|
|
234
|
+
try {
|
|
235
|
+
return sessionStorage.getItem("vaultix_jwt");
|
|
236
|
+
} catch {
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
235
239
|
}, [isSignedIn]);
|
|
236
240
|
return {
|
|
237
241
|
isLoaded,
|