Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
snw7 committed Jun 8, 2024
1 parent e1dbffb commit 3ebeb02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ This is a lightweight API that allows communication between iOS devices and a re
### Server
1. copy this repo to your remote server and install docker
2. (optional) install "letsencrypt" SSL certificates for a secure connection
2. create a new .env file (based on `.env.example`) and fill the values accordingly
3. generate a random salt: `openssl rand -hex 32` & save it to your `.env`
4. update the `EXPOSE` value in your `Dockerfile`
4. build the docker container with `docker build -t otp-auth .`
6. run the docker container `docker run -d -p <your-port>:<your-port> -v /etc/letsencrypt/:/etc/letsencrypt/ otp-auth` (volume mount is only required for SSL setup)
3. create a new .env file (based on `.env.example`) and fill the values accordingly
4. generate a random salt: `openssl rand -hex 32` & save it to your `.env`
5. update the `EXPOSE` value in your `Dockerfile`
6. build the docker container with `docker build -t otp-auth .`
7. run the docker container `docker run -d -p <your-port>:<your-port> -v /etc/letsencrypt/:/etc/letsencrypt/ otp-auth` (volume mount is only required for SSL setup)

### Client
1. install the `Scriptable` app from the App Store
2. for each of the `*.js` files in the `client/` folder: create a new script in the `Scriptable` app
3. replace the default SALT in the `run.js` file with the previously generated value
4. open the `otp-action.shortcut` file with the `Shortcuts` app and install the workflow
5. check if the correct js script is selected in the first action
6. execute the shortcut -> you should receive a success message from your server
4. open the `otp-auth-client.shortcut` file with the `Shortcuts` app and install the workflow
5. select the `gen-otp-token.js` script in the first action of the workflow
6. enter the domain of your server and the port the service is running on in action 4
7. execute the shortcut -> you should receive a success message from your server

## License
This project is written by snw7 and licensed under the MIT License.

This project uses https://github.com/emn178/js-sha3 @copyright Chen, Yi-Cyuan 2015-2018.
This project uses https://github.com/emn178/js-sha3. (c) Chen, Yi-Cyuan 2015-2018.
File renamed without changes.
Binary file not shown.

0 comments on commit 3ebeb02

Please sign in to comment.