Skip to main content

Passwordless Login

Passwordless Login streamlines the authentication process by enabling users to access their accounts without a password. Instead of relying on traditional credentials, users receive a secure link or a One-Time Password (OTP) via email or phone. Users can securely log in by verifying the link or OTP, improving convenience and security. This approach eliminates the need to remember complex passwords, providing a smoother, more user-friendly login experience.

How It Works

  • The user enters their registered email or phone number.
  • A login link or OTP is sent to their email or phone.
  • The user clicks the link or enters the OTP.
  • Upon successful verification, they are logged in.

📌 Note: Users must first register with a password. Afterward, they can log in using their link or OTP.

Key Features

  • Frictionless Login: Enables seamless login without needing to remember passwords.
  • Enhanced Security: This reduces the risk of password theft or breaches.
  • Improved User Experience: Provides a hassle-free authentication process.
  • Alternative Authentication: Useful when users forget passwords or prefer OTP-based logins.

Configurations

Here's how to enable and configure Passwordless Login in your authentication settings in the admin console:

Steps to Enable Passwordless Login:

  • Log in to the Admin Console.
  • Navigate to Passwordless Login in Admin Console.
  • Ensure Passwordless Login is enabled.
  • If not enabled, contact the LoginRadius Support Team.

📌 Note: Passwordless Login will not function if Two-Factor Authentication (2FA) is also enabled for the user.

Integration Guide

The LoginRadius Identity Platform offers multiple implementation methodologies, enabling you to customize customer flows and select the passwordless login integration method that best suits your requirements.

Step 1: Include the JavaScript Library

Add the following script to your HTML file in the <head> tag:

<script src='https://auth.lrcontent.com/v2/LoginRadiusV2.js' type='text/javascript'></script>

Step 2:Initialize the LoginRadiusV2 Object

Set up your LoginRadius configuration in the <head> tag:

<script>
var commonOptions = {};
commonOptions.apiKey = "<your loginradius API key>";
commonOptions.appName = "<LoginRadius site name>";
commonOptions.instantLinkLogin = true;
commonOptions.instantOTPLogin = true;
var LRObject = new LoginRadiusV2(commonOptions);
</script>

These two options enable the display of the passwordless login feature for both methods:

  • commonOptions.instantLinkLogin = true;

  • commonOptions.instantOTPLogin = true;

Step 3: Load the Passwordless Login Interface and Validate Result

Add the following script before closing the </head> tag:

<script>
var login_options = {};
login_options.container = 'login-container';
login_options.onSuccess = function(response) { console.log(response); };
login_options.onError = function(errors) { console.log(errors); };
LRObject.util.ready(function() { LRObject.init('login', login_options); });

// Validate OTP
var passwordlessloginvalidate_options = {};
passwordlessloginvalidate_options.onSuccess = function(response) { console.log(response); };
passwordlessloginvalidate_options.onError = function(errors) { console.log(errors); };
LRObject.util.ready(function() { LRObject.init('passwordlessLoginValidate', passwordlessloginvalidate_options); });
</script>

Step 4: Include the Login Container

Insert the following code within the <body> tag to add the login container div:

<div id="login-container"></div>

You can use any SDKs provided by LoginRadius based on your requirements for Passwordless Login SDK implementation. LoginRadius GitHub Repositories

Best Practices

  • Customize OTP messages to identify your app and reduce phishing risks.
  • Enforce limits on OTP retries and expiration time, and prevent reuse to block brute-force attempts.
  • Use secure and compliant email/SMS providers to ensure message deliverability and protection against spoofing.