noOTP Login For Websites & Apps#
WAuth offers two options for businesses to enable a 'Login with WhatsApp' interface on their websites and mobile apps.Q: How is Login with WhatsApp' different from 'Login Using Google / Facebook'?Login with WhatsApp is similar to Login Using Google/ Facebook. The difference is that for verification of phone number we do not need access to user's contacts, content or any WhatsApp settings. Thus is far safer for end users.
Approach 1: QR Scan Based Login#
This approach simplifies login on websites accessed from laptops or desktops. The user journey is as follows:1.
The business hits WAuth's Init API to generate a QR Code URL (qrURL).
2.
The business displays the generated QR on the website by pasting the URL inside an <img>
tag.
3.
The user scans the QR code using a mobile camera or QR code scanner app.
4.
The user is asked to confirm if the WhatsApp application needs to be opened on the mobile phone.
5.
The user confirms the login attempt by submitting a message to a pre-rendered WhatsApp chat window.
6.
A webhook request is triggered to the business, which can notify the user of the verification confirmation or poll WAuth's Verify Endpoint to confirm the verification status and grant access to the user.
Sequence flow#
Approach 2: Link Redirection Based Login#
This approach simplifies login on mobile apps or mobile sites accessed from smartphones. The user journey is as follows:1.
The business hits WAuth's Init API to generate a Redirection URL (appURL).
2.
The business displays the 'Login With WhatsApp' button on the app, and on click, redirects the user to appURL.
3.
The user is asked to confirm if the WhatsApp application needs to be opened on the mobile phone.
4.
The user confirms the login attempt by submitting a message to a pre-rendered WhatsApp chat window.
5.
A webhook request is triggered to the business, which can notify the user of the verification confirmation or poll WAuth's Verify Endpoint to confirm the verification status and grant access to the user.
Sequence flow#