Painyjames opened a new issue #18925: URL: https://github.com/apache/superset/issues/18925
**Issue** We recently reduced the longevity of the Superset session which came with some ajax requests coming back with 401 responses. This issue is tackled by the current [redirectUnauthorized](https://github.com/geido/incubator-superset/blob/master/superset-frontend/packages/superset-ui-core/src/connection/SupersetClientClass.ts#L234) method, which basically redirects a user to the login page, which then will redirect back to the page the user was originally. This redirection though can lead to unexpected results, since when the user is redirected back, the state is not the same. As an example: Sql editor when a long query is running: <img width="1431" alt="Screenshot 2022-02-24 at 11 48 20" src="https://user-images.githubusercontent.com/1241373/155519609-fda160c4-79c2-43c9-b0a8-8242952e82cc.png"> Sql editor after login redirect, current query is not shown on the main results panel and it seems that it's completed unless the user clicks on query history, in which case it's shown that it is still pending:   So pretty much the issue here is a mild annoyance when the login redirect happens, which could lead to some confusion within our users. **Solution we'd like** In our case, Superset has Keycloak as OIDC identity provider, which means we can have a request decorator that returns a new session when needed as part of the ajax calls responses. Our preferred solution would be that, in order to avoid this login redirection, at the time a response is [parsed](https://github.com/geido/incubator-superset/blob/master/superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts#L33), maybe we could also refresh the cookie/session on the frontend so consequent ajax calls will be able to use a valid session. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
