Skip to content

rtrocca/fb-streamlit-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple implementation of Firebase login for Streamlit based apps

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENCE
Apache-2.0
LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published