Overview
Pro Stock Tool uses a secure email and password-based authentication system. The login flow is handled through a combination of frontend validation and backend verification with secure password hashing.Login Process
The authentication system is implemented in the login page (Inicio-Sesion.html) with the following workflow:
Frontend validation
The browser validates that both fields are filled and the email format is correct.
Server verification
The backend verifies credentials against the database using secure password hashing.
Login Form Fields
The login form (Inicio-Sesion.html:42-54) contains the following fields:
| Field | Type | Name | Required | Validation |
|---|---|---|---|---|
email | email | Yes | HTML5 email validation | |
| Password | password | Contraseña | Yes | Required field |
Email Field
Password Field
The password field uses type=“password” to mask the input for security.
Authentication Security
Pro Stock Tool implements several security measures:Password Hashing
Passwords are hashed using BCrypt algorithm (PASSWORD_BCRYPT) as seen in the registration process (registro.php:48):
Database Connection Security
The system connects to the MySQL database using:- Host: localhost
- Database: prostocktool
- Connection: MySQLi with error handling (
conexion.php:8-13)
Form Submission
The login form submits credentials via POST method:Registration Link
Users without an account can navigate to the registration page:The link directs to
login.html which contains the registration form.Best Practices
Secure Credentials
Always use strong passwords with at least 6 characters (as enforced by the registration system).
Email Validation
Email addresses must be valid and unique in the system.
Session Management
Users should log out when finished to maintain security.
Connection Security
The system validates database connections before processing requests.
Error Handling
The authentication system includes comprehensive error handling:- Connection errors: Returns HTTP 500 with error message
- Invalid credentials: Prevents unauthorized access
- Database failures: Graceful error responses
Next Steps
User Registration
Learn how to create new user accounts
User Accounts
Manage and understand user account structure