Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Keystone-Strategy/streamlit-auth0

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Auth0-Streamlit

The fastest way to provide comprehensive login inside Streamlit

Example of Streamlit-Auth0|635x380

Installation

pip install pip install streamlit-auth0-component-patch

Setup

  • Register for Auth0
  • Create a Single Page Application and navigate to the "settings" tab
  • set your callback url's to http://localhost:8501/component/auth0_component.login_button/index.html assuming you're running on localhost or http://YOUR_DOMAIN/component/auth0_component.login_button/index.html if you're deploying
  • Copy client_id and domain from this page
  • Follow example below

An example

On Auth0 website start a "Single Page Web Application" and copy your client-id / domain (of form xxxx.xx.auth0.com) into code below.

from auth0_component import login_button
import streamlit as st

clientId = "...."
domain = "...."

user_info = login_button(clientId, domain = domain)
st.write(user_info)

user_info will now contain your user's information

Todo

  • Pass all info through JWT, at the moment the sub field is the only field assing through verification
  • Test with other providers, only Google tested

Deploy

  • Change version in setup.py
  • cd auth0_component/frontend/ && npm run build && cd .. && cd .. && rm -rf dist/* && python setup.py sdist bdist_wheel
  • twine upload dist/*

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.0%
  • JavaScript 42.3%
  • CSS 5.4%
  • HTML 2.3%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.