Skip to content

Release 3.2.0

Choose a tag to compare

@jim-verducci jim-verducci released this 03 Apr 01:13
· 1 commit to main since this release
6b4df69

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