Improved
React Client Auth SDK 2.0.0 Release
2 months ago by Jim Verducci
Version 2.x of the react-client-auth SDK introduces breaking changes focused on improved error handling and simplified configuration.
- The
logoutUrlproperty has been removed from theWristbandAuthProvidercomponent. The SDK now redirects only to the Login Endpoint for all failures whendisableRedirectOnUnauthenticatedis false (the default behavior). Intentional logouts are still handled via theredirectToLogout()function. - Enhanced error handling is now available through a new
authErrorproperty in theuseWristbandAuth()hook, providing detailed error codes likeUNAUTHENTICATED,SESSION_FETCH_FAILED, and more. All SDK errors now use a unifiedWristbandErrorclass 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.