How to handle with redirect in Dash app?

I made a Keycloak integration to the Dash app. And there is the logic that if a session expires, for any request from the frontend, the backend will return a redirect to the auth URL. I’m obtaining the next case: session is expired, a user makes some action on the page (for example use dropdown) and the frontend sends “POST https://app_url/_dash-update-component” request, but instead of a familiar response as JSON, receives redirect and can’t handle it. For a user, it looks like the app is broken and he has to refresh the page. Is there any way to proceed with a redirect?

dash 2.11.1, dcc 2.11.0