Skip to main content

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


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.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

fb_streamlit_auth-0.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file fb_streamlit_auth-0.0.1.tar.gz.

File metadata

  • Download URL: fb_streamlit_auth-0.0.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for fb_streamlit_auth-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f6544aac616b7e9f5bb0bbf86750604c9600b2eaf70c3b8bf424d8a1cfe4468e
MD5 63b94d789dfab85e275f4efe28ce6b2b
BLAKE2b-256 4febb05283fcb7f7b122aca5e2f9a2e31e3a4f6ecf633128ae92228504ef5452

See more details on using hashes here.

File details

Details for the file fb_streamlit_auth-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fb_streamlit_auth-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e411a7efc2380c679c36a037b1830af0197d31fcb21fd6de8c74909ad9a9666
MD5 28b5e7a4a31ef17a3fbe2e0f53eb794d
BLAKE2b-256 f2547da4f4a3bd13c8ec97ab5933c3418860f302219d409c07bd97d9b5c7fe7b

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