0.1.0 • Published 2 years ago

@sphereon/did-auth-siop-web-demo-root v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

SIOP v2 Demo Website

This is a demo website to test and showcase the "Self Issued OpenID Provider v2 (SIOP)" library.

NOTE: Please note, this is not intended as production code, nor a starting point for your own implementation. It is a quite simple and crude implementation to show how the SIOP and OIDC4VP tech can work.

Getting started

Configure environment

In the ./onto-demo-server folder, create a file called .env.local and populate it using .env as example. A valid config will look like this

NODE_ENV=development
PORT=5001
COOKIE_SIGNING_KEY=8E5er6YyAO6dIrDTm7BXYWsafBSLxzjb
REDIRECT_URL_BASE=http://192.168.1.200:5001/ext
RP_DID=did:ethr:0xe1dB95357A4258b33A994Fa8cBA5FdC6bd70011D
RP_PRIVATE_HEX_KEY=850e54b92c6291a1ff7b8c3ef30e032571ed77c9e5c78b1cd6ee5fec4fea984f
AUTH_REQUEST_EXPIRES_AFTER_SEC=300
MOCK_AUTH_RESPONSE=false

Except for the IP address this is a valid configuration to test with. You will need to replace it with the public IP interface/address where this server will be running and make sure it is accessible from your phone and the port is open in the firewall.

Build & start

From the root directory

  • yarn global add concurrently
  • yarn global add ts-node
  • yarn install-all
  • yarn build
  • yarn start

The server will start on port 5001, the client will start & open a browser on http://localhost:3000/

Usage

Once the demo site has loaded, you should see the following screen:

/resources/start-screen.png

Click "Sign in" A QR code will appear which can be scanned with the mobile OP authenticator module from our SSI-SDK.

img_1.png

app "rn-did-siop-example-app" After a successful login two extra page will appear in the menu navigation.

Docker

From the root folder run:

docker build -t onto-web-demo .
docker run -it -p 5001:5001 -p 3000:3000 onto-web-demo

Docker compose

From the root folder run:

docker-compose up