diff --git a/README.md b/README.md index 0fdecd7..421b7c7 100644 --- a/README.md +++ b/README.md @@ -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 : -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 : -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. \ No newline at end of file +This project uses https://github.com/emn178/js-sha3. (c) Chen, Yi-Cyuan 2015-2018. \ No newline at end of file diff --git a/client/run.js b/client/gen-otp-token.js similarity index 100% rename from client/run.js rename to client/gen-otp-token.js diff --git a/shortcuts/otp-auth-api.shortcut b/shortcuts/otp-auth-client.shortcut similarity index 55% rename from shortcuts/otp-auth-api.shortcut rename to shortcuts/otp-auth-client.shortcut index d95e5be..f130f6b 100644 Binary files a/shortcuts/otp-auth-api.shortcut and b/shortcuts/otp-auth-client.shortcut differ