html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="index.css">
<title>OtpLess Login</title>
<script src="https://otpless.com/auth.js"></script>
</head>
<body>
<div id="main-container">
<!-- Login Container -->
<div id="otpless-container">
<h1>Welcome to <span class="highlight">OtpLess</span></h1>
<p>Login quickly and securely using your WhatsApp!</p>
<div id="otpless" class="button"></div>
</div>
<!-- Success Message Container -->
<div id="success-container" class="hidden">
<h2>🎉 You're logged in!</h2>
<p>Welcome <strong>without OTP</strong>, directly through your phone.</p>
<div id="user-details"></div>
<button class="logout-btn" onclick="logout()">Logout</button>
</div>
</div>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* General Reset */
body, h1, h2, p, button {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background: #fff;
color: #000;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#main-container {
width: 100%;
max-width: 400px;
padding: 20px;
}
#otpless-container, #success-container {
text-align: center;
padding: 30px;
border: 2px solid #009d88;
border-radius: 10px;
Enter to Rename, Shift+Enter to Preview
js
js
1
alert("try this on your laptop or sololearn webpage so you can understand how exactly it works.")
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run