// Real-time password strength newPw.addEventListener('input', () => const password = newPw.value; const strength = checkStrength(password); strengthBar.style.width = strength.width; strengthBar.style.background = strength.color; strengthText.textContent = strength.text; strengthText.style.color = strength.color;

const PORT = process.env.PORT || 5000; app.listen(PORT, () => console.log( Server running on port $PORT )); 1. HTML ( frontend/change-password.html ) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <title>Mobcash - Change Password</title> <link rel="stylesheet" href="change-password.css"> </head> <body> <div class="container"> <div class="card"> <div class="header"> <img src="https://via.placeholder.com/50?text=M" alt="Mobcash Logo" class="logo"> <h1>Change Password</h1> <p>Secure your Mobcash account</p> </div> <form id="passwordChangeForm"> <div class="input-group"> <label>Current Password</label> <div class="password-wrapper"> <input type="password" id="currentPassword" placeholder="Enter current password" required> <span class="toggle-pw" data-target="currentPassword">👁️</span> </div> </div>

.toggle-pw position: absolute; right: 12px; cursor: pointer; font-size: 1.2rem; user-select: none;

const strengthMap = 0: width: '0%', text: 'Very weak', color: '#e74c3c' , 1: width: '20%', text: 'Weak', color: '#e67e22' , 2: width: '40%', text: 'Fair', color: '#f1c40f' , 3: width: '60%', text: 'Good', color: '#3498db' , 4: width: '80%', text: 'Strong', color: '#2ecc71' , 5: width: '100%', text: 'Very strong', color: '#27ae60' ;

.card background: white; border-radius: 20px; padding: 30px 25px; box-shadow: 0 20px 35px rgba(0,0,0,0.2); animation: fadeIn 0.5s ease;

// 1. Validation if (!currentPassword );

module.exports = router; const express = require('express'); const mongoose = require('mongoose'); const cors = require('cors'); require('dotenv').config(); const authRoutes = require('./routes/auth');

Feedback

Please let us know if you have any comments, corrections or ideas to improve!

Explore Cayman Magazine

The 2025 edition of the Explore Cayman magazine is a 164 page full colour magazine and is available on Island for free!

View Now

Explore Cayman App

The Explore Cayman app is the #1 app for the Cayman Islands and can be downloaded for free from the Apple App Store and Google Play Store.

Learn More