54 lines
2.3 KiB
HTML
54 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<script type="text/javascript" src="https://sdk.userbase.com/2/userbase.js"></script>
|
|
<script src="https://unpkg.com/userbase-js@latest/dist/userbase-sdk.umd.js"></script>
|
|
<script src="script.js"></script>
|
|
<meta charset="UTF-8">\
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Userbase Authentication Demo</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Userbase Authentication Demo</h1>
|
|
|
|
<div id="auth-section">
|
|
<h2>Signup</h2>
|
|
<form id="signup-form">
|
|
<input type="text" id="signup-username" placeholder="Username" required>
|
|
<input type="email" id="signup-email" placeholder="Email (optional)">
|
|
<input type="password" id="signup-password" placeholder="Password" required>
|
|
<button type="submit">Sign Up</button>
|
|
<p id="signup-message" class="message"></p>
|
|
</form>
|
|
|
|
<h2>Login</h2>
|
|
<form id="login-form">
|
|
<input type="text" id="login-username" placeholder="Username" required>
|
|
<input type="password" id="login-password" placeholder="Password" required>
|
|
<button type="submit">Log In</button>
|
|
<p id="login-message" class="message"></p>
|
|
<p><a href="#" id="forgot-password-link">Forgot Password?</a></p>
|
|
</form>
|
|
<div id="logged-in-actions" style="display: none;">
|
|
<button id="go-to-profile-button">Go to Profile</button>
|
|
<button id="logout-button-main-page">Log Out</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="forgot-password-section" style="display: none;">
|
|
<h2>Forgot Password</h2>
|
|
<p>Enter your username to receive a temporary password.</p>
|
|
<form id="forgot-password-form">
|
|
<input type="text" id="forgot-username" placeholder="Username" required>
|
|
<button type="submit">Send Temporary Password</button>
|
|
<p id="forgot-password-message" class="message"></p>
|
|
</form>
|
|
<p><a href="#" id="back-to-login-link">Back to Login</a></p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|