![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
streamlit-authenticator-sheets
Advanced tools
A secure authentication module to validate user credentials in a Streamlit application using the Google Sheets API and the library of streamlit authenticator.
A secure authentication module to validate user credentials in a Streamlit application.
Streamlit-Authenticator-Sheets is distributed via PyPI:
pip install streamlit-authenticator-sheets
Using Streamlit-Authenticator_Sheets is as simple as importing the module and calling it to verify your predefined users' credentials.
import streamlit as st
import streamlit_authenticator as stauth
credentials:
names: ['John Smith', 'Rebecca Briggs']
usernames: ['jsmith', 'rbriggs']
passwords: ['123', '456'] # To be replaced with hashed passwords
cookie:
name: 'some_cookie_name'
key: 'some_signature_key'
expiry_days: 30
hashed_passwords = stauth.Hasher(['123', '456']).generate()
Finally replace the plain text passwords in the configuration file with the hashed passwords.
with open('../config.yaml') as file:
config = yaml.load(file, Loader=SafeLoader)
authenticator = stauth.Authenticate(
config['credentials']['names'],
config['credentials']['usernames'],
config['credentials']['passwords'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days']
)
name, authentication_status, username = authenticator.login('Login', 'main')
if authentication_status:
authenticator.logout('Logout', 'main')
st.write(f'Welcome *{name}*')
st.title('Some content')
elif authentication_status == False:
st.error('Username/password is incorrect')
elif authentication_status == None:
st.warning('Please enter your username and password')
if st.session_state['authentication_status']:
authenticator.logout('Logout', 'main')
st.write(f'Welcome *{st.session_state["name"]}*')
st.title('Some content')
elif st.session_state['authentication_status'] == False:
st.error('Username/password is incorrect')
elif st.session_state['authentication_status'] == None:
st.warning('Please enter your username and password')
Or prompt an unverified user to enter a correct username and password.
Please note that logging out will revert the authentication status to None and will delete the associated reauthentication cookie as well.
FAQs
A secure authentication module to validate user credentials in a Streamlit application using the Google Sheets API and the library of streamlit authenticator.
We found that streamlit-authenticator-sheets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.