St.login 400: 'NoneType' object does not support item assignment

Need assistance. Deploy Streamlit app locally, Windows 11 24H2

Python: 3.13.10

Streamlit: 1.52.1

I have the basic code to reproduce error:

import streamlit as st

:small_blue_diamond: App Layout

print(“Starting app.py”)
st.title(“Login test”)
user = st.login(provider=“default”)
#st.button(“Login with Google”, on_click=st.login)

I have .streamlit/secrets.toml file:
[auth]
redirect_uri = “http://localhost:8501/oauth2callback”
cookie_secret = “value”
client_id = “value”
client_secret = “value”
server_metadata_url = “https://accounts.google.com/.well-known/openid-configuration”

When I start app via command: “streamlit run app.py”, I receive page with error message:
400: ‘NoneType’ object does not support item assignment

Can anyone advise why does it happen?
Thank you

Same issue here, my client worked perfectly fine.
Today, everything stopped working for no apparent issue:
400: 'NoneType' object does not support item assignment

Did you solve the issue?

make

Authlib==1.3.2
will work with you

3 Likes

This works. Thank you so much!!

It did work for me too

Authlib was >= 1.6.0, when setup on 1.3.2 it started to work

THank you!

Setting Authlib to 1.6.5 also works. Seems to be an issue with 1.6.6?

1.6.6 was released on Dec 12th so that was probably the trigger.

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