@axcode/axcloud-sdk 0.5.0 → 1.0.0

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.mjs CHANGED
@@ -441,7 +441,8 @@ function useAuth() {
441
441
  }
442
442
  }, [getAccessTokenSilently]);
443
443
  const refreshUser = useCallback(async () => {
444
- await getAccessTokenSilently({ cacheMode: "off" });
444
+ const token = await getAccessTokenSilently({ cacheMode: "off" });
445
+ if (!token) return false;
445
446
  const claims = await getIdTokenClaims();
446
447
  return claims?.email_verified === true;
447
448
  }, [getAccessTokenSilently, getIdTokenClaims]);