liveBook · Manning

Identity provider

As explained in Build Python Web Apps with Streamlit

An identity provider is a service that authenticates users and supplies identity information to relying applications.

An identity provider is a service that verifies a user’s identity and supplies identity information to an application. With OpenID Connect (OIDC), a Streamlit app can send users to providers such as Google, Microsoft, Okta, or Auth0 instead of managing passwords and password hashes itself. section 8.4.3

A typical identity-provider setup requires:

  • Creating an account with an OIDC-supporting provider. section 8.4.3
  • Storing the client ID, client secret, and related metadata in st.secrets. section 8.4.3
  • Calling st.login to redirect users to the provider, then reading login status or email through st.user. section 8.4.3
  • Calling st.logout to end the session and return users to the app. section 8.4.3

Google sign-in

A user selects Log in, is redirected to Google, and returns authenticated to the app. The app can check st.user.is_logged_in and display st.user.email without storing the user’s password. section 8.4.3

How Build Python Web Apps with Streamlit covers it

How deep it goes
Explains provider setup, credentials, redirects, user inspection, and logout, but not OIDC protocol internals.
Examples
Uses Google, Microsoft, Okta, and Auth0 as providers and demonstrates st.login, st.user, and st.logout.
What it assumes
Assumes a Streamlit application and teaches provider-based login without requiring local password storage.
What you can do after
Operate/configure Streamlit authentication with an OIDC provider and inspect the authenticated user.
How it connects
Connects identity providers with OpenID Connect, authentication, sessions, and Streamlit.

Also explained in

Compare how 12 books explain identity provider →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.