Hi, I’m excited about the SSO potential of st.login(). We have a Streamlit app that’s running on a linux vps with https using dokploy and traefik. We also have Authentik running as our OIDC provider and want to use it with the app.
I changed the authentication strategy from using streamlit-authenticator, which was doing OK, to using st.login, following the api documentation guidance. In particular, I created the [auth] block of declarations in the secrets.toml file as described, for example, here.
When the app is run we get the error message st.user has no attribute “is_logged_in”. This is in response to the code if not st.user.is_logged_in:
. Checking, we find that st.user is empty.
We’ve checked our uri, callback, etc. There seems to be nothing wrong. We find no useful information in the server log (see below). Is there debugging information somewhere?
Help will be appreciated!
Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.
You can now view your Streamlit app in your browser.
URL: http://0.0.0.0:8599
2025-08-12 18:25:56.014 Uncaught app execution
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/streamlit/user_info.py", line 498, in __getattr__
return _get_user_info()[key]
KeyError: 'is_logged_in'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 128, in exec_func_with_error_handling
result = func()
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 669, in code_to_exec
exec(code, module.__dict__) # noqa: S102
File "/app/SkillsSurveyV2.py", line 16, in <module>
if not st.user.is_logged_in:
File "/usr/local/lib/python3.10/site-packages/streamlit/user_info.py", line 500, in __getattr__
raise AttributeError(f'st.user has no attribute "{key}".')
AttributeError: st.user has no attribute "is_logged_in".