# Frontend Customer Login

Once your customer is successfully registered to your Magento 2 store, they can quickly log in either using OTP or a password.

## Login with OTP

Whenever a customer chooses Login with OTP option, they will be asked to enter the mobile number for verification using OTP.

<figure><img src="/files/U4g2vkhvWtkcIkA5JuxC" alt=""><figcaption></figcaption></figure>

If the mobile number digits do not match the country validation configured by the admin in the backend, it will show an error message.

<figure><img src="/files/FQT0WqUXi1cuT6hwyGwo" alt=""><figcaption></figcaption></figure>

Once the user enters the correct mobile number and clicks on the Send OTP button, they will receive an SMS as well as an email with OTP for login.

**SMS on Mobile Number with OTP for Login**

<figure><img src="/files/mhqCmgcxiTjNCJdYCbzh" alt=""><figcaption></figcaption></figure>

**Login OTP Email**

<figure><img src="/files/oIwyYC04af2s4ccnN2NE" alt=""><figcaption></figcaption></figure>

After entering the OTP, the user needs to click on Verify & Login.

<figure><img src="/files/k370ErSxrSejWIG9eRsH" alt=""><figcaption></figcaption></figure>

In case the OTP verification time is out, the user gets the option to Resend OTP.

<figure><img src="/files/vhyh7ls9bBpNqq4YurxQ" alt=""><figcaption></figcaption></figure>

Once the OTP is verified, the login is successfully done. The old customer is redirected to the Update Mobile Number section on their My Account page. The Customer Login through OTP is protected by reCAPTCHA to avoid spam sign-in.

## Login with Password

Whenever a customer chooses the Login with Password option, they will be asked to enter their email address/mobile number and password.

**Email & Password**

<figure><img src="/files/fHYDV0SRFKZtp55J2mPb" alt=""><figcaption></figcaption></figure>

**Mobile Number & Password**

<figure><img src="/files/jVGa70T89fcXCALaFqlP" alt=""><figcaption></figcaption></figure>

Once the login details are entered correctly, the login is successfully done. The old customer is redirected to the Update Mobile Number section on their My Account page.

After successful login, the customer will be notified via email.

<figure><img src="/files/3Xoy18BkUXLotgigDTa8" alt=""><figcaption></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.magecomp.com/magento-2-mobile-otp-login-extension-pro/frontend-customer-login.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.
