Skip to content

Latest commit

 

History

History

ssi-auth

Verity SSI Authentication Demo Web App

This is a sample web app demonstrating how SSI technologies could be used for user authentication. The application covers two use cases:

  • using Committed answer protocol as a form of two-factor authentication
  • using Out-of-band protocol to register or login by scanning a QR code

Sample web app uses Verity REST API.

Launching the application Locally

Requirements:

  • You have received Domain DID and REST API key from Evernym
  • You have NodeJs v12 installed
  • You have ngrok installed (https://ngrok.com/).

NOTE: Ngrok is used to create a public webhook URL which will forward response messages from Verity Application Server to the web app. If you have capabilities to start the application on a public IP address then you don't need ngrok]

To try out the application follow these steps:

  • In a separate terminal window start ngrok for port 3000 and leave it running:
ngrok http 3000
  • Install required NodeJs packages:
npm install
  • Start the web app
node app.js
  • Fill in prompts for input parameters:
Verity Application URL: https://vas.pps.evernym.com
Domain DID: <copy domain DID received from Evernym>
X-API-KEY: <copy API key received from Evernym>
Webhook URL: <copy public URL address of the Ngrok forwarding tunnel to your local port 3000>

The application will be available on http://localhost:3000

Launching the application using Docker

Requirements:

  • You have received Domain DID and REST API key from Evernym
  • You have Docker installed

To start the app follow these steps:

  • Fill in values for VERITY_URL, DOMAIN_DID and X_API_KEY (you should have received these inputs from Evernym) into .env file in the current folder. A properly filled .env file should have this format:
VERITY_URL=https://vas.pps.evernym.com
DOMAIN_DID=W1TWvjCTGzHGEgbzdh5U4b
X_API_KEY=AkdrCwUhNXiQi3zgwKw2KhR6muAX1Q18phP4cfuMtvq4:4cBQC9EsbMa9T96KA4noZwLJQuVcd6KBwaqFhRqZQKFWT45VEm3jbPCm8S6bqhwh3UKEKAPkHeLz9Gb1d1YE1dW

NOTE: These are just sample reference values. These values will NOT work if left unchanged. You should specify DOMAIN_DID and X_API_KEY that you received from Evernym

  • Create a docker image with pre-installed requirements. Run this command from the current folder:
docker build -t ssi-auth-app .

Start a Docker container:

docker run -p 3000:3000 --env-file .env -it ssi-auth-app

The application will be available on http://localhost:3000

© 2013-2020, ALL RIGHTS RESERVED, EVERNYM INC.