You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to refresh the token every minute. So I have added code :- keycloak.onTokenExpired = () => { keycloak.updateToken(50) .then((refreshed) => { if (refreshed && keycloak.token) { console.log('Token refreshed'); } }) .catch(() => { Alert. alert('Failed to refresh the token, or the session has expired.'); });
But it's not working as expected. For example, I have a token expiration time of 1 minute so it will call after 1 * 2 = 2 minutes only for the first time after that it works every minute.
To Reproduce
Expected behavior
Screenshots
Smartphone
Device:
OS:
Version
Additional context
The text was updated successfully, but these errors were encountered:
keycloak.updateToken(50)
I want to refresh the token every minute. So I have added code :-
keycloak.onTokenExpired = () => { keycloak.updateToken(50) .then((refreshed) => { if (refreshed && keycloak.token) { console.log('Token refreshed'); } }) .catch(() => { Alert. alert('Failed to refresh the token, or the session has expired.'); });
But it's not working as expected. For example, I have a token expiration time of 1 minute so it will call after 1 * 2 = 2 minutes only for the first time after that it works every minute.
To Reproduce
Expected behavior
Screenshots
Smartphone
Additional context
The text was updated successfully, but these errors were encountered: