KEYCLOAK-7048 Clear token if refresh fails (#5124)

This commit is contained in:
Stian Thorgersen 2018-04-04 20:12:25 +02:00 committed by GitHub
parent f652b13520
commit 5514812a4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,6 +464,10 @@
} else {
console.warn('[KEYCLOAK] Failed to refresh token');
if (req.status == 400) {
kc.clearToken();
}
kc.onAuthRefreshError && kc.onAuthRefreshError();
for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {
p.setError(true);