Skip to main content

使用 Supbase 进行 JWT 身份验证

项目描述

streamlit-supbase-auth

演示

用法

先决条件:

  • 蟒蛇> = 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()

示例目录中的更多详细信息。

开发

docker-compose up --build

或者手动启动前端

cd streamlit_supabase_auth/frontend
npm install
npm run start

随后是示例应用程序

RELEASE=DEV streamlit run example/app.py

发布

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

pip install build
python -m build

已知的问题

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

streamlit_supabase_auth-1.0.2.tar.gz (639.4 kB 查看哈希)

已上传 source

内置分布

streamlit_supabase_auth-1.0.2-py3-none-any.whl (646.9 kB 查看哈希)

已上传 py3