# Login with OTP

{% hint style="success" %}
**Prerequisites:**\
The resident is issued with a unique virtual ID for a country's foundation ID. In the below demo application, which is a health portal, the resident is registered with MOSIP and has a valid UIN or VID.
{% endhint %}

1\. On the portal, the resident clicks on the button ***Sign In with eSignet***.

<figure><img src="/files/IdZ7TqGQdfpr51Std2tQ" alt=""><figcaption><p>Sign in with eSignet</p></figcaption></figure>

The login screen appears and the resident is displayed with the options they can choose for login.

2\. To get started with login with OTP authentication, the resident clicks on ***Login with OTP*** option.

<figure><img src="/files/dF5HnrJgatiOgr8qcHYo" alt=""><figcaption><p>Login with OTP</p></figcaption></figure>

3\. The resident needs to enter a valid VID in the ***Enter Your VID*** text field and check the box 'I'm not a robot'.

The OTP-based authentication is now secured with a captcha.

<figure><img src="/files/OepvX7icAnflPOfZw7oM" alt=""><figcaption><p>Enter your UIN/VID</p></figcaption></figure>

4\. Next, the resident clicks on the ***Get OTP*** button.

<figure><img src="/files/aASh7n60U14n04aXuO6R" alt=""><figcaption><p>Get OTP Page</p></figcaption></figure>

5\. The resident receives the OTP on the registered channel (either by phone or email).

6\. The resident needs to enter the valid OTP received and click on the ***Verify*** button.

<figure><img src="/files/aNSYQnJLbz5FGOMmkpe3" alt=""><figcaption><p>Verify OTP</p></figcaption></figure>

7\. The resident is then navigated to the Consent page. On this page, the **Essential** and **Voluntary** claims are displayed.

<figure><img src="/files/V7Lm1ygRq4FrXO1bV4iU" alt=""><figcaption><p>Voluntary Claims page</p></figcaption></figure>

{% hint style="info" %}
The consent screen is presented solely to the resident if consent has not previously been obtained. Additionally, a timer is incorporated into the Consent screen, allowing the resident to respond within the designated time frame. If the allotted time elapses, residents will be redirected to the relying party user interface.
{% endhint %}

8\. The resident is given the option to choose from a list of Authorized scopes and Voluntary claims. The Essential claims are mandatory and cannot be modified. A **master toggle button** has been added to allow residents to select all the options at once if desired.

<figure><img src="/files/rh8PE5hH8BLkZE0nIYsF" alt=""><figcaption><p>Vlountary Claims page</p></figcaption></figure>

9\. The resident should now click the ***Allow*** button. The system navigates the resident to the **User Profile** page which displays all the personal information based on the consent provided.

<figure><img src="/files/s7eetyLdFgWwBTFJhlwr" alt=""><figcaption><p>Profile page</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.esignet.io/esignet-authentication/test/end-user-guide/health-portal/login-with-otp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
