Accessing Refresh Token with Streamlit MSAL


I am hoping to find a way to access the refresh token with Streamlit MSAL for a smoother re-auth process when the access token expires.

Steps to reproduce

Code snippet:
login_token = msal_authentication(
“clientId”: “xxxxxxxxxxx”,
“authority”: “”,
“redirectUri”: “/”,
“postLogoutRedirectUri”: “/”
}, # Corresponds to the ‘auth’ configuration for an MSAL Instance
“cacheLocation”: “sessionStorage”,
“storeAuthStateInCookie”: False
}, # Corresponds to the ‘cache’ configuration for an MSAL Instance
“scopes”: [“”]
}, # Optional
logout_request={}, # Optional
login_button_text=“Login”, # Optional, defaults to “Login”
logout_button_text=“Logout”, # Optional, defaults to “Logout”

This will authenticate us with no problems. When I print out the login_token, I can see the access token as well as the decoded data of the token itself. However, I don’t see anything on the refresh token.

If I look in the sessionStorage for the site, I can see the refresh token.

I’ve looked on PyPi Page and the GitHub that page references for examples of the refresh token, but I was unable to find anything.

Are refresh tokens currently supported? If so is there some documentation I am missing? Any insight or help is greatly appreciated.

It actually ended up being a Snowflake Connection timeout error instead of anything with MSAL

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.