Streamlit component that allows you to implement Firebase login
Project description
fb-streamlit-auth
Simple component that implements Firebase authentication.
Example usage:
import streamlit as st
from fb_streamlit_auth import fb_streamlit_auth
st.write('''## Hello
- world
''')
user = fb_streamlit_auth(
"<apiKey>",
"<authDomain>",
"<databaseURL>",
"<projectId>",
"<storageBucket>",
"messagingSenderId",
"appId",
"measurementId"
)
st.write(user)
The implementation, right now, is really crude. The API is subject to change. The user
object returned by fb_streamlit_auth is None if the user is not logged in.
When the user is logged in the object also contains the custom claims associated to the user. In this way the app can check for claims to block or allow access.
Inspiration
My main source of inspiration was the msal_streamlit_authentication library
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fb_streamlit_auth-0.0.2.tar.gz
(127.8 kB
view hashes)
Built Distribution
Close
Hashes for fb_streamlit_auth-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6208c9057973111b4ab76dcc0c20cab76d30640649d4eab45988de65d4e46aa |
|
MD5 | 771e70a247157fb0549e267b49a170b9 |
|
BLAKE2b-256 | ffc2b37e6498b186dcf8f481735c3cd35c1b17035b37009479ee4428ac761cb3 |