Authentication Overview
Finanzapp implements multiple authentication methods and security measures to protect user accounts while maintaining a seamless user experience. All authentication logic is processed on our secure remote server atpro.finanzapp.es.
The frontend provides the authentication interface, while all credential verification, token generation, and session management occur on the backend server.
Authentication Methods
1. Email and Password Authentication
Users can register and log in using email and password credentials.Registration Flow
Step 1: Form Submission
Step 1: Form Submission
The registration form collects user information:
- Full name
- Email address
- Password
- Password confirmation
- Terms of service acceptance (required)
- Optional notification preferences
app/register.php:122-160Step 2: Client-Side Validation
Step 2: Client-Side Validation
Before submission, JavaScript validates all inputs:Email validation:Password requirements:Password matching:
- Minimum 8 characters
- At least one uppercase letter (A-Z)
- At least one number (0-9)
Step 3: Server Processing
Step 3: Server Processing
Valid form data is sent to the remote authentication server:The server:
- Validates input again (server-side validation)
- Checks for existing users
- Hashes the password securely
- Creates the user account
- Establishes a session
- Returns success/failure response
Login Flow
Step 1: Form Submission
Step 1: Form Submission
The login form is minimal and secure:Form location:
app/login.php:121-141Step 2: reCAPTCHA Verification
Step 2: reCAPTCHA Verification
All login attempts are protected by reCAPTCHA v3 (see reCAPTCHA section).
Step 3: Credential Verification
Step 3: Credential Verification
Credentials are sent securely to the authentication server:The server:
- Verifies reCAPTCHA token
- Checks for brute-force attempts
- Validates credentials against database
- Creates session if successful
- Returns authentication result
2. Google OAuth 2.0
Users can authenticate using their Google account for a faster, more secure login experience.Google OAuth Configuration
Client ID:665269631824-25f2bkbj039grhjavj17pkqjsjdqj0jr.apps.googleusercontent.com
Login with Google
Implementation Details
Implementation Details
Google Sign-In is integrated on the login page:Callback handler:
Register with Google
Implementation Details
Implementation Details
Google Sign-In for registration uses redirect mode:The redirect URI handles:
- Google credential verification
- User account creation (if new)
- Session establishment
- Redirect to dashboard
Google OAuth provides additional security benefits:
- No password storage required
- Two-factor authentication support (if enabled in Google account)
- Automatic email verification
- Reduced phishing risk
reCAPTCHA v3 Integration
Finanzapp uses Google reCAPTCHA v3 to protect against automated attacks and bot traffic.Site Configuration
Site Key:6LdpGAErAAAAABtf_pOcsJbRBnytt5t8_WahFXAY
Integration Points
Login Page Protection
Login Page Protection
reCAPTCHA is required for all login attempts:
API Script
API Script
The reCAPTCHA API is loaded from a local, integrity-verified script:Location:
js/api.jsThis script loads the reCAPTCHA v3 library with:- Subresource Integrity (SRI) - Ensures script hasn’t been tampered with
- CORS settings - Cross-origin anonymous requests
- Localization - Spanish interface (
recaptcha__es.js)
How reCAPTCHA Works
- User interaction - User fills out login form
- Challenge display - reCAPTCHA checkbox appears
- Token generation - Upon verification, reCAPTCHA generates a token
- Form submission - Token is included with login credentials
- Server verification - Backend verifies token with Google’s API
- Score evaluation - Server receives risk score (0.0 to 1.0)
- Access decision - Login proceeds if score is acceptable
reCAPTCHA v3 runs in the background and assigns a risk score without requiring user interaction in most cases. The visible checkbox provides an additional challenge when needed.
Brute-Force Protection
While the frontend doesn’t implement rate limiting directly, the backend server provides comprehensive brute-force protection.Server-Side Protection Measures
Implemented onpro.finanzapp.es:
Rate Limiting
Rate Limiting
- Maximum login attempts per IP address
- Maximum login attempts per email address
- Progressive delays between failed attempts
- Temporary account lockouts after threshold
IP-Based Blocking
IP-Based Blocking
- Automatic IP blocking for suspicious patterns
- Geo-location analysis for anomalous access
- Known bad actor IP blacklisting
Account Protection
Account Protection
- Email notifications for failed login attempts
- Account lockout after multiple failures
- Security verification for account recovery
- Password reset with secure tokens
CSRF Protection
Cross-Site Request Forgery protection is implemented:- Generated on form load
- Validated on form submission
- Single-use and time-limited
- Tied to user session
Session Management
Secure session handling is critical for maintaining authenticated state.PHP Session Configuration
- Automatic session start - Initialized when needed
- Status checking - Prevents duplicate session starts
- Language persistence - User preferences stored in session
- Secure cookies - HttpOnly and Secure flags (server-side)
Session Security Best Practices
Implemented on the backend:- Session ID regeneration on login
- Secure session cookies (HttpOnly, Secure, SameSite)
- Session timeout after inactivity
- Session invalidation on logout
- Protection against session fixation
Password Security
Client-Side Requirements
Passwords must meet these minimum requirements:- Length: Minimum 8 characters
- Uppercase: At least one letter (A-Z)
- Numbers: At least one digit (0-9)
Server-Side Security
Passwords are processed securely on the backend:Hashing Algorithm
Hashing Algorithm
Passwords are hashed using modern algorithms (bcrypt or Argon2) before storage. Plain text passwords are never stored.
Salt Generation
Salt Generation
Each password receives a unique salt to prevent rainbow table attacks.
Password Updates
Password Updates
Password changes require:
- Current password verification
- New password meeting requirements
- Re-authentication after change
Password Reset
Secure password recovery is available: Reset link: /app/reset.php The reset process:- User provides registered email
- Secure token generated and emailed
- Token expires after time limit
- User creates new password
- All sessions invalidated
Real-Time Validation
The frontend provides immediate feedback during form entry:- Instant validation feedback
- Visual error indicators
- Improved user experience
- Reduced invalid submissions
Authentication Best Practices
For Users
Strong Passwords
Create passwords with:
- Mix of uppercase and lowercase
- Numbers and special characters
- Avoid common words or patterns
- Use unique passwords per service
Account Security
- Enable two-factor authentication (via Google OAuth)
- Monitor login notifications
- Report suspicious activity immediately
- Keep recovery information updated
For Developers
- Always use HTTPS for authentication pages
- Validate inputs on both client and server
- Never log or expose sensitive data
- Follow secure coding guidelines
- Keep dependencies updated
Related Documentation
Security Overview
Learn about overall security architecture and principles
Data Protection
Understand encryption and privacy policies
Additional Resources
- Terms of Service
- Privacy Policy
- Cookie Policy
- Security Contact: [email protected]
