diff --git a/README.md b/README.md index b2be360a1f4e004bd5524b5dde33eb92b1e73606..1545396f2b7c933961e6a6d0af2226c4c09cd081 100644 --- a/README.md +++ b/README.md @@ -14,24 +14,22 @@ source venv/bin/activate pip install -r requirements.txt ``` -## Enrollment +## Enrollment of secret Launch a Python shell, e.g., using: ```bash source venv/bin/activate -python3 +python3 main.py -e ``` -Within the shell, type: +This will only store the secret locally in the secret storage, with minimal validation. +To facilitate scripting, you can also pass the token as a quoted (!) string to the script, i.e like that: -```python -from main import enroll_token -enroll_token("otpauth://totp/...") # replace this with the URL you've gotten from the 2FA enrollment system +```bash +python3 main.py -e "otpauth://totp/..." ``` -This will only store the token locally in the secret storage, without any validation whatsoever. - ## Get token ```bash @@ -39,6 +37,16 @@ source venv/bin/activate ./main.py ``` +## Deletion of secret + +If you ever want to delete the token, just call the script with the `-d` argument: + +âš ï¸ there is no confirmation of the deletion, it will just delete the token! + +```bash +python3 main.py -d +``` + ## License This "project" is licensed under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/), i.e., released to the public domain. TL;DR: You can do whatever the fuck you want to with this code, but don't hold me liable if something bad happens.