improved
React Client Auth SDK 2.0.0 Release
13 days 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
logoutUrl
property has been removed from theWristbandAuthProvider
component. The SDK now redirects only to the Login Endpoint for all failures whendisableRedirectOnUnauthenticated
is false (the default behavior). Intentional logouts are still handled via theredirectToLogout()
function. - Enhanced error handling is now available through a new
authError
property in theuseWristbandAuth()
hook, providing detailed error codes likeUNAUTHENTICATED
,SESSION_FETCH_FAILED
, and more. All SDK errors now use a unifiedWristbandError
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.