Skip to content

Commit

Permalink
Clean up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed May 20, 2024
1 parent ced34a6 commit 9a08666
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MagicalAuth is a simple but magical authentication system for Python application
## Environment Variables

- `APP_NAME`: The name of the application. This will be used in the magic link email to the user.
- `ALLOWED_DOMAINS`: A comma-separated list of allowed email domains. If this is set, only users with email addresses from these domains will be allowed to register and login. If this is not set, all email domains will be allowed.
- `ALLOWED_DOMAINS`: A comma-separated list of allowed email domains. If this is set, only users with email addresses from these domains will be allowed to register and login. If this is not set, it will default to `*` and all email domains will be allowed.
- `ENCRYPTION_SECRET`: The secret key used to encrypt and decrypt the magic link tokens. This should be a long random string.
- `MAGICALAUTH_SERVER`: The URL of the MagicalAuth server. This should be the URL of the server that is running the MagicalAuth FastAPI service.
- `MAGIC_LINK_URL`: The URL that the magic link will point to. This should be the URL of the application that will handle the magic link. It will send query parameters `email` and `token` to this URL that will be used on the `MAGIC_LINK_URL` endpoint to authenticate the user.
Expand All @@ -26,12 +26,9 @@ docker-compose down && docker-compose pull && docker-compose up
```

Access the FastAPI documentation at `http://localhost:12437` .
Access the Streamlit UI at `http://localhost:8519` .

## UI Example
### Web User Interface

See [UI.py](UI.py) for an example of how to use MagicalAuth in a Streamlit application. You can run it with the following command:
See [UI.py](UI.py) for an example of how to use MagicalAuth in a Streamlit application. It runs with the FastAPI service in the Docker Compose setup.

```bash
streamlit run UI.py
```
Access the Streamlit UI at `http://localhost:8519` .

0 comments on commit 9a08666

Please sign in to comment.