# VP Verification - Cross Device Flow

## Overview

This guide covers the cross-device Verifiable Presentation (VP) verification flow, where the verifier and credential holder use separate devices. The verifier generates a QR code containing an authorization request, which the holder scans using their mobile wallet (such as Inji Wallet) on a different device.

This flow follows the OpenID4VP specification and enables secure credential sharing without requiring the verifier and holder to be on the same device. The wallet authenticates the user, collects consent, and sends the VP response back to Inji Verify for validation and result display.

## VP Verification (Cross Device Flow)

1. **Initiate VP Request Process**

* Initiate VP Request Process by clicking on '**Request Verifiable Credentials'** to begin the verification process.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-5004a0cf64ccfbffaef045ed9040dd846679745a%2Fimage15.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

2. **Select Credentials & Generate QR Code**: The verifier is presented with a list of verifiable credential types with specific credentials already pre-selected(configurable) based on a specific usecase.

* Pre-selected credential types are listed on the top and rest of the credentials (non-selected ones) are displayed in alphabetical order.
* The list of VCs can also sorted in ascending or descending order using Sort option.
* Each credential type is displayed with a checkbox next to it.
* The verifier reviews the list and selects the desired credentials by clicking the checkboxes provided in the list.
* Verifier can also search for a credential by entering the credential type (1 or more letters to be entered in the search box and filtered results appear in the dropdown).

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-714b39383cd2012500b342ff981392461ee90fa3%2Fimage16.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* Choose the required verifiable credentials from the popup window and click '**Generate QR Code'**.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-48396fa3231b5831008379b3ce507205d76e7c64%2Fimage17.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

3. **Scan QR Code from Mobile wallet (Use a Different Device)**: Use a wallet containing verifiable credentials on a different device with QR code scanning capabilities to scan the QR code.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-09a0211544e02851cf386c2d59523f8670f2aa8c%2Fimage18.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

Note: The steps that Inji wallet performs to support this interaction are:

* The Wallet interprets the VP request and lists all the matching credentials available in the Wallet.
* The Wallet prompts the user to authenticate and then seeks consent to share the requested credential(s).
* The Wallet sends the VP response via HTTPS POST to the Inji Verify portal.

4. **View Verification Results in Inji Verify**: Inji Verify displays the verification results of the verifiable credentials shared from the wallet which could be either 'Valid', 'Valid\
   but Expired', 'Invalid'.

* **Single VC display**
  * **Valid VC**

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-2cb9bdb27a401114b0d9ddb18eca9ed8fe6d5f33%2Fimage19.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* Click on full screen option to view the Verifiable Credentials data as an enlarged view.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-b11c260094883b15669113eaced6012304f7cf46%2Fimage20.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* Click on download option to download the VC data as a json file.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-d09e65d1b9f07d6e00518b148362b791f6d127ef%2Fimage21.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* **Expired VC**

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-39b04cbdf9f766c03a278f0712344d303ac3b642%2Fimage22.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* **Invalid VC**

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-4976125c7856ea6fc763064a9672b1153d9c8bb6%2Fimage23.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

* **Multiple VCs display**

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-2a14b31c03b187994b529c3dd57489128dd291f1%2Fimage24.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

#### **Partial sharing of requested credentials**

If not all the requested VCs are shared from wallet, then the status of missing VC result area is displayed as 'Not Shared'

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-24efc01508bb3913fa980e17facd3a2032e80cb9%2Fimage25.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

As the verifier is informed of the missing credentials in VC result section, the verifier has to **either Generate Request for Missing Credentials or Generate a New Request for restarting the VP sharing flow.** The verifier can request for missing credentials by continuing the flow by clicking on 'Request Missing Credentials' to generate another QR code that requests the missing credentials.

Another button - 'Restart Process' helps user to re-initiate the VP Request process\
all over again (by displaying the popup window to select the credentials and rest of the process continues to be the same), if required.

**Re-Generate VP Request for missing VPs**

1. **Request Missing Credentials**: Upon clicking "Request Missing Credentials" button, the Verifier portal automatically identifies the credentials that were not received in the previous transaction. A new Verifiable Presentation (VP) request is generated, containing only the missing credentials.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-f916fc5b1f605f5972bc4fe33f1cde19e52a1b49%2Fimage26.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

2. **QR Code/Link Display:**

* The new VP request is encoded into a QR code.
* The QR code is displayed on the Verifier portal and is ready for the Holder to scan or access.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-51885692314c8730e151bd7fb49431b53a09c96c%2Fimage27.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

3. **Holder Interaction:**

* The Holder (Inji Wallet) scans the new QR code or accesses the link.
* The Wallet fetches the new VP request and lists the pending credentials (if they are available in the Wallet) along with the list of previously verified credentials from our original request.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-6ee5ab5a9e62720b7bd35ef993e1e8cc4c449eda%2Fimage28.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

4. **Credential Sharing and Verification:**

* The process of selecting credentials, providing user consent, and sending the VP response follows the standard flow.
* The Verifier receives the pending credentials and completes the verification process.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-f916fc5b1f605f5972bc4fe33f1cde19e52a1b49%2Fimage26.png?alt=media" alt="" width="500"><figcaption></figcaption></figure>

5. **Final Verification Completion:**

* Once all credentials are received and verified, the Verifier portal displays a final confirmation message indicating that all requested credentials have been successfully verified.
* The process is marked as complete.

<figure><img src="https://3039626265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaY8BQ4hdzhSchZV814Ev%2Fuploads%2Fgit-blob-349dcb049c41852eb86c193a23490f6ad13860fc%2Fimage29.png?alt=media" alt="" width="150"><figcaption></figcaption></figure>

**Note:**

1. For any VCs displayed after verification, the verifier is provided with an option to download the VCs in json format.
2. For any VCs displayed after verification, the verifier is provided\
   with an option to expand the VCs to full view.
