This NextJS app is the result of the Verifier Web SDK tutorial. If you follow the tutorial, you should be able to present credentials remotely using this minimal demo application.
To run the app, you need:
- Access to a MATTR VII tenant. Sign-up for a free trial here.
- Provide the following environment variables:
NEXT_PUBLIC_TENANT_URL=
NEXT_PUBLIC_APPLICATION_ID=
NEXT_PUBLIC_WALLET_PROVIDER_ID=
MATTR_CLIENT_ID=
MATTR_CLIENT_SECRET=
NGROK_AUTHTOKEN=
NEXT_PUBLIC_TENANT_URL: Your MATTR VII tenant URL, required for the web app to interact with your tenant.NEXT_PUBLIC_APPLICATION_IDandNEXT_PUBLIC_WALLET_PROVIDER_ID: Unique identifiers of the relevant verifier application and wallet provider configured on your MATTR VII tenant. Required for the interactions between the web application, the wallet and your tenant.MATTR_CLIENT_ID=andMATTR_CLIENT_SECRET: Required to retrieve the presentation results via an authenticated backend API call. You can use the MATTR Portal to create new clients for your MATTR VII tenant.NGROK_AUTHTOKEN: Your ngrok authentication token for exposing the app publicly.
This project contains an env-template file which you can copy to .env to configure your local environment.
The app must be publicly accessible for the wallet to communicate with it. This project uses ngrok to create a tunnel for you. You can get a free account at ngrok.com.
Once your environment variables are configured, you can run the app via
npm install
npm run devThis will start both the ngrok tunnel and the Next.js development server concurrently. The public URL will be displayed in the terminal.
If you want to run only the Next.js app without the tunnel, use:
npm run dev:app