Keycloak-angular: Dealing with expired token

Created on 2 Feb 2018  路  2Comments  路  Source: mauriciovigolo/keycloak-angular

How does this library deal with expired Keycloak token? Does it automatically redirect user to the login screen again?

Most helpful comment

It depends which token you're talking about.

If the Access Token is expired, the keycloak-js updateToken method is used, see: https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L394

If the Refresh Token expires, I guess it redirects to the login page. @mauriciovigolo is that correct?

All 2 comments

It depends which token you're talking about.

If the Access Token is expired, the keycloak-js updateToken method is used, see: https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L394

If the Refresh Token expires, I guess it redirects to the login page. @mauriciovigolo is that correct?

@frederikprijck, what I meant was a refresh token. But I tried it with my testing Keycloak server instance, set really short session expiration time and it worked like a charm!

Thanks a lot for developing this library. It solves so many common problems when dealing with Keycloak!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

unib1t picture unib1t  路  4Comments

arratejasvi picture arratejasvi  路  4Comments

czeckd picture czeckd  路  4Comments

ayoubnejm picture ayoubnejm  路  3Comments

ValentinBossi picture ValentinBossi  路  4Comments