-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
139 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
swagger-codegen-cli.jar | ||
ngrok.yml | ||
|
||
.data | ||
.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,77 @@ This project holds the standard FIDO2 api endpoints and the Proof of Knowledge f | |
The api is a stateful session-based architecture with endpoint guards. | ||
A user must prove ownership of a private key to associate PublicKeyCredentials | ||
|
||
|
||
|
||
## Getting started | ||
|
||
### Prerequisites | ||
- Node.js 20 | ||
- Docker | ||
|
||
#### Clone the project | ||
|
||
```bash | ||
git clone [email protected]:algorandfoundation/liquid-auth.git && cd liquid-auth | ||
``` | ||
|
||
#### Install package dependencies | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
#### Build Dependencies | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
WebAuthn requires a secure context (HTTPS) to work and this will not allow you to test the FIDO2 feature in your local machine. | ||
|
||
### NGROK | ||
|
||
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: | ||
|
||
|
||
#### Configure NGROK | ||
|
||
```bash | ||
cp ./ngrok.template.yml ngrok.yml | ||
``` | ||
|
||
Make sure to update the `authtoken` and `domain` in the `ngrok.yml` file with your ngrok details. | ||
|
||
```yaml | ||
version: 2 | ||
authtoken: <NGROK_AUTH_TOKEN> | ||
tunnels: | ||
website: | ||
addr: 5173 | ||
proto: http | ||
domain: <STATIC_DOMAIN> | ||
|
||
``` | ||
|
||
#### Update the Service's .docker.env file | ||
|
||
```bash | ||
HOSTNAME=example-static-domain.ngrok-free.app | ||
ORIGIN=https://example-static-domain.ngrok-free.app | ||
``` | ||
|
||
#### Start services | ||
|
||
Run the following command to start the backend: | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
Navigate to the ngrok URL in your browser to test the FIDO2 feature. | ||
|
||
|
||
## Using the app | ||
|
||
#### Install the [Android client]() to your device and navigate to https://nest-fido2.onrender.com/. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:20-alpine | ||
|
||
ADD . . | ||
|
||
RUN npm install | ||
|
||
RUN npm run build | ||
|
||
|
||
EXPOSE 5173 | ||
|
||
CMD ["npm", "run", "dev:ui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
authtoken: <NGROK_AUTH_TOKEN> | ||
tunnels: | ||
website: | ||
addr: liquid-demo:5173 | ||
proto: https | ||
domain: <NGROK_STATIC_DOMAIN> |