WhatsApp Setup

One-time codes delivered via WhatsApp

Password-less connections: One-time codes delivered via WhatsApp

Passwordless authentication is the process of self-identification by entering a mobile phone number or email address and receiving a one-time verification code via text or through Auth0's app, which can then be used to log in.

This service is provided by Auth0. When a user authenticates using a passwordless connection, they are really connecting via Auth0 as the Identity Provider (IdP). Since there's no way to make users constantly reuse the same methods of authentication without incurring an undue burden on them, it's common for a single user to end up with multiple user profiles connected to different providers.

Account linking leverages this fact by providing functionality that links multiple active accounts from the same identity provider into a single super account so that authorized requests will display data from all connected accounts.

Create an application and enable multi-factor authentication:

  1. Go to https://manage.auth0.com,
  2. Click on the ‘Create application button’ in the 'Applications’ tab from the dashboard,

  1. Choose 'Single Page Web Applications’, add a name in the 'Name’ field and click 'Create'.

  1. Select the 'React Multi-factor’ option. You can now download the code folder and run it locally.
  2. Now, go to the 'Security’ tab on the dashboard and choose 'Multi-factor Auth’.
  3. On the 'Multi-factor authentication’ screen, scroll and enable the 'One-time Password’ option, then choose the option "Always" for Require Multi-factor Auth

  1. Back on the ‘Multi-factor authentication’ screen, scroll and click the ‘Phone Message’ option.
  2. Choose the ‘Custom’ option in the delivery provider and ‘SMS’ in the delivery method.

You have now created an application and enabled multi-factor authentication for the same.

Create a hook

  1. Go to the 'Auth Pipeline’ tab on the dashboard.
  2. On the 'Hooks’ page, create a 'Send Phone Message’ hook with the Gupshup API.

  1. Now, go to the 'Actions’ tab on the dashboard, and choose 'Flows’.
  2. On the 'Flows’ screen, choose the 'Send Phone Message’ option.

  1. Since the hook is already enabled, it will show on the screen. Make sure the hooks are mapped correctly.

Lastly, log in and check whether multi-factor authentication is enabled and you are getting a verification code on WhatsApp, as part of additional security.