Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 3.2 KB

File metadata and controls

66 lines (48 loc) · 3.2 KB

MATTR

Verify Credentials using Presentation Request Callbacks

Overview

This demo app can orchestrate a series of API calls to your tenant on the MATTR platform to setup a Presentation Request with a Callback to a Ngrok instance that tunnels to your localhost. In order for a MATTR Mobile Wallet app to read the Presentation Request the terminal will display a QR Code for scanning or a Deeplink that can be sent to the Mobile Wallet using any existing messaging app.

Get Started

Pre-requisites:

  • You'll need a valid Access token for the MATTR Platform, if you do not have a tenent set up get started here.
  • Have a valid Verifier DID and Presentation Template and know the ID's of each.
  • Download the MATTR Mobile Wallet app and hold a Credential matching the Presentation Request
  • Have your local development environment setup with Node and NPM/Yarn, you will need to make outbound calls to the internet.
  1. Clone the sample-apps repo
  2. Change to the verify-callback-express directory
  3. yarn install dependencies
cd verify-callback-express
yarn install

Environment variables are used from a .env file. Rename the .env-template to .env and provide the details from your tenant.

TENANT=tenant.vii.mattr.global
TEMPLATEID=<presentation-request-template-uuid>
VERIFIERDID=<verifier-did>
NGROK_AUTHTOKEN=<ngrok-auth-token>

Start the server

Append your valid Platform access token to the end of the start command to start the Express server

yarn start <access_token>

The access token is stored in memory and used to make API calls to your tenant over HTTPS

Steps

The App starts an Ngrok tunnel to your localhost.

The App will call out to your tenant and create a Presentation Request. It uses the didcommUri value from the response to display a QR code. Open the MATTR Mobile Wallet holding a matching Verifiable Credential and scan the QR code. Or, copy the displayed Deeplink URL and sent via alternate messaging means to the mobile device with the MATTR Mobile App and open the link.

The 'Verification Request' screen should be displayed.

Uses

This app is provided as a learning tool to test Verifying Credentials using the Callback method.

It is not intended to run any production workloads.


Copyright © MATTR Limited. Some rights reserved.
“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.