Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: redirect to login page on session timeout. #1904

Open
adjiandov opened this issue Feb 22, 2024 · 0 comments
Open

[Question]: redirect to login page on session timeout. #1904

adjiandov opened this issue Feb 22, 2024 · 0 comments
Labels

Comments

@adjiandov
Copy link

What Version of the library are you using?
17.0.0

Question
How can I configure the library to redirect to the default login page (or custom page) when refresh token fails?
I have the following config:
authority: authorityUrl,
redirectUrl: window.location.origin + environment.baseHref,
postLogoutRedirectUri: window.location.origin + environment.baseHref,
clientId: clientId,
scope: 'openid profile email offline_access roles',
silentRenewUrl: window.location.origin + environment.baseHref + '/silent-renew.html',
responseType: 'code',
silentRenew: true,
useRefreshToken: true,
autoUserInfo: false.

Using keycloak as authorization server.
I see in the network that the call to the /token url to refresh the access token fails (because the refresh token has expired), but I would like to redirect to somewhere (login page, custom page, or even show a message that the session has expired). What kind of possibilities the library offer in order to achieve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant