This repository was archived by the owner on Aug 6, 2019. It is now read-only.
6.0.0
Significant updates to the handling of unauthenticated requests:
unauthorizedInterruptnow accepts a function that will be run when an API call comes back as unauthorized. The original request will be re-run if the supplied function can resolve the authorization issue, andAPIAuthorizationFailurewill be broadcast if the issue cannot be resolved.- If
unauthorizedInterruptis set to a function, any other API calls that return as unauthorized while the first one is being resolved will be held in a queue and re-run if the first call is resolved successfully. - Specify
loginPathto disableunauthorizedInterruptfunctionality on your login page, safely allowing for semantically valid401responses to bad login credentials.
Breaking changes:
- The
APIRequestUnauthorizedevent and the functionality surroundingunauthorizedInterruptnow only applies to a401error response. Previously a403would trigger the same functionality.