rode / rode-ui

User Interface application for rode that enables metadata discovery and policy creation/evaluation.
http://liatrio.com
Apache License 2.0
4 stars 1 forks source link

Drop session cookies after refresh failure #168

Closed alexashley closed 3 years ago

alexashley commented 3 years ago

If the request to refresh the access token fails, we try to redirect to login. However, this doesn't drop the existing session cookies so the request gets stuck in loop trying and failing to refresh the token, then redirecting to /login.

This PR changes the middleware to end the session, but doesn't try to reinitiate a login. I tested this by lowering the access token lifespan to 1 minute, invalidating the session in Keycloak, and waiting for a refresh to happen.

Likely there could be some better UX here, see #167 and likely #165 would be helpful.