@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 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
- return null;
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
- return null;
234
+ try {
235
+ return sessionStorage.getItem("vaultix_jwt");
236
+ } catch {
237
+ return null;
238
+ }
235
239
  }, [isSignedIn]);
236
240
  return {
237
241
  isLoaded,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaultix.ai/react",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Vaultix-ID React SDK — drop-in auth components for any React app",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",