Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev docs improve #14

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,15 +23,27 @@ A user must prove ownership of a private key to associate PublicKeyCredentials
git clone [email protected]: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 <NGROK_AUTH_TOKEN> and <NGROK_STATIC_DOMAIN>.

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 <NGROK_AUTH_TOKEN>
```

Will then ask you to deploy your static domain, make sure to change the port to **5137** like this:

``` bash
ngrok http --domain=<NGROK_STATIC_DOMAIN> 5137
```

#### Configure NGROK

Expand Down
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.4'
services:
liquid-auth:
build: .
restart: always
restart: no
env_file:
- .env.docker
ports:
Expand All @@ -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
Expand All @@ -27,7 +27,7 @@ services:
- ngrok
ngrok:
image: ngrok/ngrok:latest
restart: unless-stopped
restart: no
command:
- "start"
- "--all"
Expand 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}
Expand All @@ -55,6 +55,7 @@ services:
- mongo:/data/db
turn:
image: coturn/coturn
restart: no
deploy:
replicas: 0
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion services/liquid-auth-api-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"typescript": "^5.3.3"
},
"engines": {
"node": ">=18.0.0 <21.0.0"
"node": ">=18.0.0"
},
"jest": {
"extensionsToTreatAsEsm": [
Expand Down
Loading