fix(xo-web): clear token on authentication failure (#6937)

This prevents infinite refreshes when the token is deemed valid by the server
but the authentication failed for any reasons.
This commit is contained in:
Julien Fontanet
2023-07-25 09:49:11 +02:00
committed by GitHub
parent 14a0caa4c6
commit 005ab47d9b

View File

@@ -108,7 +108,7 @@ const xo = invoke(() => {
credentials: { token },
})
xo.on('authenticationFailure', reload)
xo.on('authenticationFailure', signOut)
xo.on('scheduledAttempt', ({ delay }) => {
console.warn('next attempt in %s ms', delay)
})