StreamlitGAuth
StreamlitGAuth is a Python library that simplifies the integration of Google Authenticator-based Single Sign-On (SSO) with Streamlit applications. With StreamlitGAuth, you can enhance the security of your Streamlit apps by enabling two-factor authentication through Google Authenticator.
Installation
You can install StreamlitGAuth using pip
Usage
import streamlit as st
from StreamlitGauth.google_auth import Google_auth
client_id = ""
client_secret = ""
redirect_uri = "http://localhost:8501"
login = Google_auth(
clientId=client_id, clientSecret=client_secret, redirect_uri=redirect_uri
)
if login == "authenticated":
st.success("hello")
pass
Replace "your_client_id" and "your_client_secret" with your actual Google OAuth 2.0 credentials.
Example Streamlit Application
import streamlit as st
from StreamlitGauth.google_auth import Google_auth
client_id = "hasjh5jk498ufiu3h89g8-aghdszjhk3k.apps.googleusercontent.com"
client_secret = "afsghfbkhfdjdsgfdjhfjkfhjkfhkjhkjdhks"
redirect_uri = "http://localhost:8501"
login = Google_auth(clientId=client_id, clientSecret=client_secret, redirect_uri=redirect_uri)
if login == "authenticated":
# your streamlit applciation
pass
else:
st.warning("login failed")
Contributing
If you would like to contribute to StreamlitGAuth, please open an issue or submit a pull request on our GitHub repository.
License
This library is released under the MIT License to encourage collaboration and use in various applications.
Metadata
Release files for StreamlitGAuth 2.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| StreamlitGAuth-2.0.9.tar.gz | 3.8 kB | Without provenance | Details for StreamlitGAuth-2.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| StreamlitGAuth-2.0.9-py3-none-any.whl | Python 3 | none | any | Details for StreamlitGAuth-2.0.9-py3-none-any.whl |
Total release size: 7.8 kB
Release files / StreamlitGAuth-2.0.9.tar.gz
| Download URL | StreamlitGAuth-2.0.9.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba67776fb373308f7584091a3dbfe73bac5e815d40db9fa451ebe839222b65b7
|
|
BLAKE2b-256 checksum How to use checksums |
d26ba7f779210ddb4f5faae3f22bc489d19f2ecd376776bd460650cd9815fb0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/0.10.1 tqdm/4.65.0 CPython/3.8.10
|
Release files / StreamlitGAuth-2.0.9-py3-none-any.whl
| Download URL | StreamlitGAuth-2.0.9-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70b9d02b8ace0268ef996bbfb0aee6449f490c2372b0225807cf13131df1565f
|
|
BLAKE2b-256 checksum How to use checksums |
27b98f232ce8daad8320476c01d5315af821c33d5dd33565d16feed16028a2f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/0.10.1 tqdm/4.65.0 CPython/3.8.10
|
Security for StreamlitGAuth 2.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.