-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from hummingbot/doc/add_credentials
add authentication instructions
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,76 @@ conda activate dashboard | |
```bash | ||
streamlit run main.py | ||
``` | ||
## Configure Credentials for Authentication | ||
|
||
### Method 1: Using hasher_generate | ||
|
||
1 - Update the Environment | ||
|
||
Ensure that you have the latest version of the project and reinstall the conda environment if needed. | ||
|
||
2 - Generate Hashed Password | ||
|
||
Open a Python terminal and utilize hasher_generate from Streamlit to generate a hashed password. Example code: | ||
|
||
``` | ||
import streamlit_authenticator as st_auth | ||
hashed_password = st_auth.hasher_generate("YOUR_PLAIN_TEXT_PASSWORD") | ||
|
||
``` | ||
|
||
3 - Edit the Credentials YAML File | ||
|
||
Locate the credentials YAML file in the root directory. | ||
Edit the file by inserting the generated hashed password from Step 2. | ||
|
||
4 - Accessing the Dashboard | ||
|
||
Run the Hummingbot Dashboard project. | ||
Use the username and the plain text password (used in Step 2) to log in to the dashboard. | ||
|
||
5 - Logging Out | ||
|
||
To log out, navigate to the dashboard and select 'Logout'. | ||
|
||
|
||
### Method 2: Using Pre-Authorized Emails for User Registration | ||
|
||
1 - Update the Environment | ||
|
||
As in Method 1, ensure your conda environment and project version are up-to-date. | ||
|
||
2 - Whitelist Emails | ||
|
||
In the credentials YAML file, add the emails of users who will be pre-authorized to register and create their credentials. | ||
|
||
``` | ||
pre_authorized_emails: | ||
- [email protected] | ||
- [email protected] | ||
``` | ||
|
||
3 - User Registration | ||
|
||
Direct users to the Hummingbot Dashboard. | ||
Users should select 'Register' and enter one of the pre-authorized email addresses. | ||
They will choose their own username and password during registration. | ||
|
||
4 - First-Time Login | ||
|
||
Users log in with their chosen username and password. | ||
The dashboard will hash and store their credentials automatically. | ||
|
||
5 - Logging Out | ||
|
||
Similar to Method 1, users can log out by navigating to the dashboard and selecting 'Logout'. | ||
|
||
### Additional Notes | ||
|
||
- Video instruction link - https://drive.google.com/file/d/17ecd2aWHZCyuK5Etcv8AZwXMw2B-1sJG/view?usp=share_link | ||
- Users created through Method 2 (Pre-Authorized Emails) will have their hashed passwords automatically generated and stored. | ||
- Always ensure the secure handling and storage of credentials. | ||
- Utilize the 'Logout' feature to secure information and restrict access to the dashboard when it is not in use. | ||
|
||
## Updating | ||
|
||
|