Integration of VIDwallet
This integration guide helps you to integrate your mobile app with VIDwallet. If you need to perform a login authentication with VIDwallet from a mobile app, i.e. in the same device, you can interact with the VIDwallet through this app to app integration.
You can use the component did-siop
to request credentials from the VIDwallet. It is available at npm.
did-siop
is a library written in Typescript that implements the OpenID Connect SIOP flow.
The current DID Auth implementation follows DID SIOP Auth, which uses two JSON Web Tokens (JWT) signed by both two parties DID keys in a double challenge-response authentication. It is also supported the protocol to exchange Verifiable Credentials as part of the ID token response.
Installation​
Installation using bash
:
npm install @validatedid/did-auth
Installation using yarn
:
yarn add @validatedid/did-auth
Verifiable Credential Exchange​
This is the high-level flow of the steps required to exchange credentials:
Steps:
- You need an VIDcredentials API Key! Contact us, we'll create and provide it to you.
- All calls to our API need to be authenticated. Use the VIDcredentials API Key to request an authentication JWT.
- Prepare your request to the wallet (need to sign it before sending), see the details in our library documentation.
- Request the credentials you want to get in your app in the wallet. You need to provide the Credential Types you are requesting, and the "callback" url (a deep-link, so remember to register your deep-link from your app).
- Almost done! You'll get a "callback" with the Verifiable Presentation with the requested credentials.
- Optional but more than highly recommended. Do a quick call to our VIDcredentials API to verify the signature of the Verifiable Presentation and the claims we handed to you.
And voilà ! You completed a full credential exchange. You have the credentials, use and keep them wisely!
Check the package documentation to get more detailed instructions in how to integrate it with your app