Skip to content

Commit

Permalink
fix app auth with : as user:pwd separator
Browse files Browse the repository at this point in the history
  • Loading branch information
dayesouza committed Nov 11, 2024
1 parent 5f15420 commit 64c5efc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ When deploying your app on Azure or AWS, you may need to configure user credenti

- **User Credentials Environment Variable**

Add credentials in the format `user=password`, separated by semicolons (`;`), to your web app's environment variables:
Add credentials in the format `user:password`, separated by semicolons (`;`), to your web app's environment variables:

```plaintext
USER_CREDENTIALS="user1=pwd1;user2=pwd2"
USER_CREDENTIALS="user1:pwd1;user2:pwd2"
```

This setup ensures secure handling of user authentication and sensitive configurations across different deployment platforms. By using these configurations, you can maintain control over user access and protect essential settings.
Expand Down
4 changes: 2 additions & 2 deletions app/components/app_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def load_passwords() -> None:
if credentials_string:
user_pairs = credentials_string.split(";")
for pair in user_pairs:
if "=" in pair:
user, password = pair.split("=")
if ":" in pair:
user, password = pair.split(":")
credentials_dict[user] = password

secrets_content = {"passwords": credentials_dict}
Expand Down

0 comments on commit 64c5efc

Please sign in to comment.