Authenticate using a callback

In order to start a verification flow using a callback, you will need to set up your local environment to be able to receive HTTP requests as well as calling a number of APIs to generate the required messages.

It is recommended to use the verify-callback-express ExpressJs app from the MATTR Sample Apps repo. This will orchestrate the calls for you and generate a QR code, making it simple for the MATTR mobile wallet to interact with your MATTR VII tenant.

Once you have installed dependencies and provided the configuration from your MATTR VII tenant in the .env file and run the ExpressJs app, you will see a QR code in the console.

Scanning the QR code will prompt the mobile wallet to show a 'New request' consent screen. Once the wallet holder consents and responds to the request, MATTR VII will receive the authenticated DID response and present it in the specified callback (in this case, your terminal):

Copy to clipboard.
2  "presentationType": "DIDAuth",
3  "challengeId": "GW8FGpP6jhFrl37yQZIM6w",
4  "claims": {},
5  "verified": true,
6  "holder": "did:key:z6MkkxU8iVDyXW1GgQdURDxS7SGsvzPhyDqz82XhL3sSJUs8"
  • verified: This indicates the verification status of this DID (true / false).

  • holder: This is the authenticated DID obtained from the mobile wallet. It can now be used to issue credentials and/or send secure messages directly to this wallet.

Alternatively to using the ExpressJs app, you can follow this tutorial to setup your local environment to receive callbacks.