How Banks Verify Your Identity at Login: JWT, Device Fingerprinting, and 2FA
When you log into your bank account, a lot happens in the background before you see the dashboard. Modern banks like Chase don't just check your username and password — they run a layered security pipeline. Here's how it works technically. Step 1: Credential Verification Your username and password are hashed (bcrypt or Argon2) on the server side and compared against the stored hash. Banks never…
When you attempt to access your banking account online, several security measures are triggered before you reach the main dashboard. Top banks, like JPMorgan Chase, employ a multi-layered verification process, rather than simply relying on a username and password.
Step one involves checking the credentials entered by the user. The server hashes the provided username and password using secure algorithms such as bcrypt or Argon2 and compares these hashed values with the stored hashes. Critical to understand is that banks never store user passwords in plaintext, which significantly bolsters security.
Next up is device fingerprinting. Once the credentials pass verification, the system examines the device being used for the login attempt. This includes details about the browser, operating system, screen resolution, language settings, and more. The server maintains a database of previously encountered devices linked to each account ID. If the system encounters a new device, it initiates additional verification steps to ensure the login is legitimate.
Following successful device authentication, the bank issues a short-lived session token. This token can be either a signed JSON Web Token (JWT) or an opaque session ID stored in an HttpOnly cookie. The HttpOnly attribute prevents JavaScript from accessing the token, thereby mitigating the risk of Cross-Site Scripting (XSS) attacks. The server might set the cookie with attributes like Secure, SameSite=Strict, and HttpOnly to enhance its security.
In addition to the above, if the system detects any unusual activity, such as a new device, a different location, or if the account has two-factor authentication (2FA) enabled, the user will be prompted to provide a one-time passcode (OTP). This OTP can be sent via SMS to the registered phone number or generated by an authenticator app. TOTP, adhering to the RFC 6238 standard, provides a time-based, 30-second validity period for this OTP.
After the login process, the bank's system performs a risk assessment in real-time. It evaluates various factors including recent transaction patterns, geolocation data, and whether the device is recognized as trustworthy. If the risk score exceeds a predefined threshold, the system may require additional authentication steps to ensure the transaction's legitimacy.
For those who prefer to avoid technical explanations, Chase provides a user-friendly guide addressing common login errors, forgotten usernames, locked accounts, and issues related to mobile app logins. This approach ensures users are well-informed about the security measures in place without delving into complex technical details.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to