> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate Email Address or Mobile Number and OTP/MagicLink (user has password)

Storefront Gateway supports user authentication with an email address or mobile number and either an OTP or Magic Link. The user navigates to the organization's login page to sign in, and once authenticated, they can access and start using the services associated with their account.

## User Authentication Flow

**Preconditions**

* The User ID exists in Storefront Gateway with a previously verified AuthN ID.
* The user has already created their password.

**Note:** The `create-password-prompt` is an optional parameter on the UI and is disabled (false). The user doesn't need to enter their password to complete their authentication. If your organization requires users to enter their password enable `create-password-prompt` (true) to prompt users for their password.

Following is a typical user authentication example for this flow:

* The user navigates to your organization's login page.
* The user enters a AuthN ID such as their email address or mobile number.
* The user selects their type of login either OTP or MagicLink
* Storefront Gateway sends a verification message with a One-Time Password (OTP) or MagicLink to the user's email address or mobile number.
* The user submits the OTP verification code or clicks the MagicLink sent by Storefront Gateway.
* The user is logged in after Storefront Gateway's successful identity verification.

## Authenticate User with Email or Mobile and OTP/MagicLink

The first process begins the user's journey to verify that the user exists in Storefront Gateway and is using OTP or MagicLink to authenticate.

**Note:** The `showLoginPrompt` is enabled (true) on the UI and prompts the user to select their type of login as either OTP or MagicLink.

<img src="https://mintcdn.com/amdocs-spbu/0TZ9XF1Mst_2ATcV/marketONE/sgProcessGuide/images/onboardAuthV2_OTPMagicLinkwPW.png?fit=max&auto=format&n=0TZ9XF1Mst_2ATcV&q=85&s=8321ece458c3a017ea4035bd9d91beff" alt="Authenticate user with OTP or MagicLink authentication flow" width="1347" height="1208" data-path="marketONE/sgProcessGuide/images/onboardAuthV2_OTPMagicLinkwPW.png" />

The second **Onboard, Authenticate and Activate** Process, also known as the **Finish Login and Enroll** Process, finishes the user's authentication journey. This process completes with the [Associate Account to User](c_associateBillingAccountV2) once the user submits their OTP or clicks on the MagicLink for verification.

<img src="https://mintcdn.com/amdocs-spbu/0TZ9XF1Mst_2ATcV/marketONE/sgProcessGuide/images/onBoardAuthActV2_OTPMagicwPW.png?fit=max&auto=format&n=0TZ9XF1Mst_2ATcV&q=85&s=ab9239fedc211e3c6f4ef07fa9abcf13" alt="Authenticate user with OTP or MagicLink authentication flow" width="1158" height="635" data-path="marketONE/sgProcessGuide/images/onBoardAuthActV2_OTPMagicwPW.png" />

## Application Settings

Some of the relevant app settings for this use case are:

* `showLoginPrompt`
* `create-password-prompt`
* `shortTokenExpirationPeriodinMinutes`
* `longTokenExpirationPeriodinMinutes`
* `withAccountDiscovery`
* `discoverAccountsBy`

See additional details about more [app settings](onboardAuthenticateUserV2#application-settings) in the MarketONE Admin console and [parameters](onboardAuthenticateUserV2StepInterfaces) to help you configure your Storefront Gateway instance.

**Parent topic:**[Onboard and Authenticate Process](onboardAuthenticateUserV2)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.