bleumink / streamlit-keycloak

User authentication and single sign-on in your Streamlit app using Keycloak
MIT License
59 stars 11 forks source link

How is Token Refresh Occurring? #22

Open defblox opened 1 year ago

defblox commented 1 year ago

In the README, I see "By default your access tokens will be refreshed when they expire. Refreshing the tokens will cause your app to be re-rendered. "

Is this literally happening in the background on its own? If not, how does one go about refreshing an expired token? My basic issue right now is trying to use stream-lit keycloak in a multipage streamlit app with short token expiry where a user might spend more time than the token life trying to fill a form. By the time submission occurs, you get 401s (not authorized) from backend APIs. That is expected, but I'm trying to figure out what I can do to catch that and avoid using expired tokens.