Added

Session Revalidation for React SDK

📣 Wristband React Client Auth SDK 3.2.0 Release 🎉

Release 3.2.0

New Features

validateSession() Added to useWristbandAuth()

The validateSession() function has been added to the useWristbandAuth() hook, allowing applications to manually re-fetch the authenticated user's session and update auth state without a full page reload.

Behavior:

  • Sets isLoading to true during the request
  • On success: Updates userId, tenantId, metadata, and sets isAuthenticated to true
  • On failure with disableRedirectOnUnauthenticated: true: Sets authError and isAuthenticated to false
  • On failure with disableRedirectOnUnauthenticated: false: Redirects to the login URL

Primary use cases:

  • Popup-based OAuth login flows where the parent window needs to revalidate auth state after the popup closes
  • Public pages with disableRedirectOnUnauthenticated={true} that need to check if the user has since authenticated