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
Question
Is there an elegant way to sign out the user when multiple requests return 401?
Explanation:
I created an ErrorInterceptor which returns the this.oidcSecurityService.logoffAndRevokeTokens() method if the responce status is 401. This works ok if there is only one request fired from the app (only one 401 response in network tab), but if there are more request that fail with 401 (imagine multiple dropdowns getting data from the BE, for example) then my Authority Provider (Keycloak) gives me a message Missing parameter: id_token_hint (not really sure if this is a Keycloak issue or an issue with this library).
Then it works correctly and triggers just one request to the revoke endpoint /realms/<realm_name>/protocol/openid-connect/revoke (the erroneous case above triggers multiple revoke calls).
Is there a more elegant way to solve this issue?
PS: this case happens if i Sign Out a session in the Keycloak admin panel (and most likely when the total session time expires too)
The text was updated successfully, but these errors were encountered:
What Version of the library are you using?
17.0.0
Question
Is there an elegant way to sign out the user when multiple requests return 401?
Explanation:
I created an ErrorInterceptor which returns the
this.oidcSecurityService.logoffAndRevokeTokens()
method if the responce status is 401. This works ok if there is only one request fired from the app (only one 401 response in network tab), but if there are more request that fail with 401 (imagine multiple dropdowns getting data from the BE, for example) then my Authority Provider (Keycloak) gives me a message Missing parameter: id_token_hint (not really sure if this is a Keycloak issue or an issue with this library).My interceptor:
My service
If on the other hand i change my interceptor and service to:
Then it works correctly and triggers just one request to the revoke endpoint
/realms/<realm_name>/protocol/openid-connect/revoke
(the erroneous case above triggers multiple revoke calls).Is there a more elegant way to solve this issue?
PS: this case happens if i Sign Out a session in the Keycloak admin panel (and most likely when the total session time expires too)
The text was updated successfully, but these errors were encountered: