Skip to content

lubauss/questmind-supabase-auth

 
 

Repository files navigation

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 streamlit_supabase_auth/frontend
npm run build
cd ../..

pip install build
python -m build

Known Issues

About

Streamlit Supabase Component

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 72.8%
  • Python 20.2%
  • Dockerfile 4.5%
  • HTML 1.9%
  • CSS 0.6%