銀行如何在登入時核實你的身份:JWT、裝置指紋識別與雙重認證
How Banks Verify Your Identity at Login: JWT, Device Fingerprinting, and 2FA
銀行會透過分層安全流程核實登入者身份,包括比對密碼雜湊,以及檢查帳戶是否曾使用該裝置。登入成功後,伺服器會發出短效 JWT 或不透明工作階段 token;如有需要,則以 TOTP 或 SMS OTP 進行雙重認證,TOTP 有效期為 30 秒。登入後,系統會根據交易模式、地理位置及裝置信任度即時計算風險評分,超出門檻的交易會觸發重新認證。
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 store plaintext passwords.
Step 2: Device Fingerprinting
After password verification, the server checks whether this device (browser, OS, screen resolution, language) has been seen before for your account. This is stored server-side and keyed to your account ID. A new device triggers step-up authentication.
Step 3: Session Token (JWT or opaque token)
On success, the server issues a short-lived session token — often a signed JWT or an opaque session ID stored in an HttpOnly cookie. HttpOnly means JavaScript cannot read it, protecting against XSS.
Set-Cookie: session=<token>; HttpOnly; Secure; SameSite=Strict
Step 4: 2FA (If Triggered)
If the device is new, location unusual, or the account has 2FA enabled, an OTP is sent to the registered phone or generated by an authenticator app. The OTP is time-based (TOTP, RFC 6238) and valid for 30 seconds.
Step 5: Risk Score
After login, a risk score is calculated in real time based on transaction patterns, geolocation, and device trust. Transactions above a threshold trigger re-authentication.
For users who want a plain-English walkthrough of what all this means when you're just trying to sign in, the Chase login guide covers common errors, forgotten usernames, locked accounts, and mobile app login — without the technical jargon.
Summary
| Step | Technology |
|---|---|
| Password check | bcrypt / Argon2 hash comparison |
| Device check | Fingerprint database lookup |
| Session | JWT or opaque token in HttpOnly cookie |
| 2FA | TOTP (RFC 6238) or SMS OTP |
| Risk | ML-based anomaly detection |
Understanding this pipeline helps you appreciate why your bank occasionally asks you to verify your device — it is not a bug, it is the security model working correctly.
來源:DEV Community · dev.to