This release fixes an edge case when using logout({ localOnly: true })
, where it generates a race condition if you happen to query for SDK state directly after logging out.
Now, logout
can return a Promise when using a custom cache implementation. In general, if you're interested in accurately assessing SDK state after logging out locally, you should await the result and act afterwards.
const logout = async () => {
await auth0.logout({ localOnly: true });
const authed = await isAuthenticated();
}
Fixed
- Changes to logout and cache synchronicity #758 (stevehobbsdev)