
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
streamlit-cognito-auth
Advanced tools
A Streamlit component for authenticating users with AWS Cognito
To install the package, you can use pip:
pip install streamlit-cognito-auth
To use the package, you can import the CognitoAuthenticator
class from the streamlit_cognito_auth
package, and create an instance of it, passing your pool_id
, app_client_id
and app_client_secret
as the arguments.
from streamlit_cognito_auth import CognitoAuthenticator
To perform login, you can call the login() method on the authenticator instance and check the returned value, if it's True then the user is logged in, otherwise the login process failed.
is_logged_in = authenticator.login()
if not is_logged_in:
print("Login failed")
To perform logout, you can call the logout() method on the authenticator instance
authenticator.logout()
You can also get the logged in user's username by calling get_username() method on the authenticator instance
username = authenticator.get_username()
You can find the full example code in examples/example.py
file.
You can find an example of how to use the package in the examples directory.
To run the example file, you can use the following command, while replacing your_pool_id
, your_app_client_id
and your_app_client_secret
with the actual values:
export POOL_ID="your_pool_id"
export APP_CLIENT_ID="your_app_client_id"
export APP_CLIENT_SECRET="your_app_client_secret"
cd examples
streamlit run example.py
or in windows
set POOL_ID="your_pool_id"
set APP_CLIENT_ID="your_app_client_id"
set APP_CLIENT_SECRET="your_app_client_secret"
cd examples
streamlit run example.py
login
logout
Login with temporary password
Reset password and login
pycognito
library for authentication, which is a Python library that provides a simple interface for working with AWS Cognito. We would like to express our gratitude to the authors of pycognito
for their work and for providing an excellent library for working with AWS Cognito.FAQs
A Streamlit component for authenticating users with AWS Cognito
We found that streamlit-cognito-auth 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.