st.login() starts authentication for a Streamlit app through a configured identity provider. Instead of handling passwords and user records yourself, the app redirects users to a provider such as Google, Microsoft, Okta, or Auth0. section 8.4.3
Start provider-based login
After configuring an OpenID Connect provider, call st.login() when the user needs to authenticate. The provider handles account creation or sign-in, then the app can inspect st.user.is_logged_in and st.user.email. section 8.4.3
A working setup requires:
- An account with an identity provider that supports OpenID Connect. section 8.4.3
- A client ID, client secret, and additional metadata stored in st.secrets. section 8.4.3
