From d725d8af31cc12da8696fad568a3d5fbf08a3b36 Mon Sep 17 00:00:00 2001 From: ehanoc Date: Mon, 29 Apr 2024 13:24:07 +0100 Subject: [PATCH 1/3] Clarify some instructions steps Signed-off-by: ehanoc --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6b92382..acd4cee 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A user must prove ownership of a private key to associate PublicKeyCredentials ## Getting started ### Prerequisites -- Node.js 20 +- Node.js 18+ - Docker #### Clone the project @@ -23,15 +23,27 @@ A user must prove ownership of a private key to associate PublicKeyCredentials git clone git@github.com:algorandfoundation/liquid-auth.git && cd liquid-auth ``` -#### Install package dependencies +### NGROK -WebAuthn requires a secure context (HTTPS) to work and this will not allow you to test the FIDO2 feature in your local machine. +**note on VPNs**: Ngrok will not work with VPNs, so to run locally the project, `disable` it or `configure` your VPN's split tunneling to allow ngrok traffic. -### NGROK +Sign up for a free account at [ngrok](https://ngrok.com/) and follow the instructions to get your and . -Sign up for a free account at [ngrok](https://ngrok.com/) and install the ngrok package. -Configure a Static Domain for your ngrok account and update the [.env](services/liquid-auth-api-js/README.md) file with the following keys with the values from ngrok: +#### With Docker +Don't run the ngrok commands directly as expressed in the ngrok guide as it will create run-time port conflicts. +#### Without Docker +nrokg will ask you to add your auth token to your configuration file. + +``` bash +ngrok config add-authtoken +``` + +Will then ask you to deploy your static domain, make sure to change the port to **5137** like this: + +``` bash +ngrok http --domain= 5137 +``` #### Configure NGROK From 22f9d819fcecd6460640b669a25ec999ac660f48 Mon Sep 17 00:00:00 2001 From: ehanoc Date: Mon, 29 Apr 2024 13:25:22 +0100 Subject: [PATCH 2/3] Allow Node 18+ versions Signed-off-by: ehanoc --- services/liquid-auth-api-js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/liquid-auth-api-js/package.json b/services/liquid-auth-api-js/package.json index 1bcd41e..ceae1fb 100644 --- a/services/liquid-auth-api-js/package.json +++ b/services/liquid-auth-api-js/package.json @@ -77,7 +77,7 @@ "typescript": "^5.3.3" }, "engines": { - "node": ">=18.0.0 <21.0.0" + "node": ">=18.0.0" }, "jest": { "extensionsToTreatAsEsm": [ From 5ecc4bc4e1d0fa6ef8c79fba1cab048b7045fee1 Mon Sep 17 00:00:00 2001 From: ehanoc Date: Mon, 29 Apr 2024 13:25:47 +0100 Subject: [PATCH 3/3] Do not restart containers in dev mode to avoid unwanted run-time issues Signed-off-by: ehanoc --- docker-compose.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 26f86e7..d1b6ebe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.4' services: liquid-auth: build: . - restart: always + restart: no env_file: - .env.docker ports: @@ -13,12 +13,12 @@ services: - mongo - ngrok liquid-demo: + restart: no build: context: . dockerfile: Vite.Dockerfile ports: - "5173:5173" - restart: always environment: - PROXY_URL=http://liquid-auth:3000 - WSS_PROXY_SERVER=ws://liquid-auth:3000 @@ -27,7 +27,7 @@ services: - ngrok ngrok: image: ngrok/ngrok:latest - restart: unless-stopped + restart: no command: - "start" - "--all" @@ -44,7 +44,7 @@ services: - "6379:6379" mongo: image: mongo:7.0 - restart: always + restart: no environment: - MONGO_INITDB_DATABASE=${DB_NAME:-fido} - MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME:-algorand} @@ -55,6 +55,7 @@ services: - mongo:/data/db turn: image: coturn/coturn + restart: no deploy: replicas: 0 depends_on: