Reference project for using msal-streamlit-authentication
-
Configure the application Edit dashboard.py, by providing the
msal_authentication
with your Single Page Application config. Don't forget to set the callback url tohttps://localhost:8501
value = msal_authentication( auth={ "clientId": "CLIENT_ID", "authority": "https://login.microsoftonline.com/TENANT_ID", "redirectUri": "http://localhost:8501/", "postLogoutRedirectUri": "/" }, cache={ "cacheLocation": "sessionStorage", "storeAuthStateInCookie": False }, login_request={ "scopes": ["https://graph.microsoft.com/.default"] }, key=1 )
-
Build the Docker container
docker build -t streamlit .
-
Run the container
docker run -p 8501:8501 streamlit
-
Naviguate to
https://localhost:8501
to see the demo