Skip to main content

JWT authentication with Supabase

Project description

streamlit-supabase-auth

Demo

Usage

Prerequisite:

  • python >= 3.7
import streamlit as st
from streamlit_supabase_auth import login_form, logout_button

session = login_form(
    url="https://xxxx.supabase.co",
    apiKey="<SUPABASE_KEY>",
    providers=["apple", "facebook", "github", "google"],
)
if not session:
    return

# Update query param to reset url fragments
st.experimental_set_query_params(page=["success"])
with st.sidebar:
    st.write(f"Welcome {session['user']['email']}")
    logout_button()

More details in example directory.

Develop

docker-compose up --build

Or manually, start the frontend

cd streamlit_supabase_auth/frontend
npm install
npm run start

Followed by the example app

RELEASE=DEV streamlit run example/app.py

Publish

cd component/frontend
npm run build
cd ../..

pip install build
python -m build

Known Issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_supabase_auth-1.0.1.tar.gz (639.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_supabase_auth-1.0.1-py3-none-any.whl (646.7 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_supabase_auth-1.0.1.tar.gz.

File metadata

  • Download URL: streamlit_supabase_auth-1.0.1.tar.gz
  • Upload date:
  • Size: 639.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for streamlit_supabase_auth-1.0.1.tar.gz
Algorithm Hash digest
SHA256 04e04bda7da066acf5d705acb1dec1d820eaef71efc741286a36f21dc31cc689
MD5 a9b314678d569515ab981a30272d3737
BLAKE2b-256 f72e45d06a86e4dbf02edee1bdee99faeb5a1948164760e87f81c0feaf22067a

See more details on using hashes here.

File details

Details for the file streamlit_supabase_auth-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_supabase_auth-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f53ea746aa59c6e7b216f37f5e45ce5fc9c8163028e12ea5c1dc739520e028
MD5 187d82675becd81447a0156c48fab6a6
BLAKE2b-256 20052c23f8d7e9174e297b83d0d37916326afb45ded7a79e14d17cb06d607593

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page