improved

React Client Auth SDK 2.0.0 Release

Version 2.x of the react-client-auth SDK introduces breaking changes focused on improved error handling and simplified configuration.

  • The logoutUrl property has been removed from the WristbandAuthProvider component. The SDK now redirects only to the Login Endpoint for all failures when disableRedirectOnUnauthenticated is false (the default behavior). Intentional logouts are still handled via the redirectToLogout() function.
  • Enhanced error handling is now available through a new authError property in the useWristbandAuth() hook, providing detailed error codes like UNAUTHENTICATED, SESSION_FETCH_FAILED, and more. All SDK errors now use a unified WristbandError class for consistent error handling across the library.

Users should remove the logoutUrl configuration and can optionally implement the new error handling patterns for better developer experience.

Refer to the v2 migration guide to learn more.