Most business applications, from CRM and billing software to MLM back offices and recharge portals, hold money, personal data or both. The login screen is the front door. If it is weak, every other security measure matters much less. This guide explains what a secure login looks like and how two-factor authentication (2FA) adds a second lock.
How passwords should be stored
A well-built application never stores passwords in readable form, and never in a form that can be reversed. Instead it stores a hash: a one-way fingerprint produced by a slow, purpose-built algorithm such as bcrypt or Argon2, with a unique random value (a "salt") for each user. When someone logs in, the system hashes what they typed and compares fingerprints.
If your developer can tell you a user's password, or a "forgot password" email sends the old password, the storage is not secure and should be fixed urgently.
Sensible password rules
- Encourage long passwords or passphrases rather than complicated short ones.
- Block commonly used and previously breached passwords where possible.
- Do not force frequent password changes without reason; it tends to produce weaker passwords.
- Allow paste, so people can use password managers.
Stop guessing attacks
Automated tools try thousands of password combinations, or reuse passwords leaked from other sites ("credential stuffing"). Defences include:
- Rate limiting: slow down or temporarily block repeated failed attempts from the same account or network address.
- Generic error messages: "Incorrect mobile number or password" rather than revealing which part was wrong.
- Alerts: notify users of logins from new devices.
- Challenge on suspicion: ask for extra verification when behaviour looks unusual.
Sessions after login
Once logged in, the user's session must be protected too. Session cookies should be marked secure and HTTP-only, sessions should expire after inactivity (shorter for admin panels), and changing a password should sign out other sessions. Users should be able to see and end their active sessions.
Two-factor authentication options
2FA means proving identity with two different things: something you know (a password) and something you have (a phone or device). Common methods:
| Method | How it works | Considerations |
|---|---|---|
| SMS OTP | One-time code sent by SMS | Familiar to users in India; depends on SMS delivery and is weaker against SIM swap |
| Email OTP | Code sent to registered email | Simple; only as safe as the email account |
| Authenticator app (TOTP) | Time-based code generated in an app on the phone | Stronger; works offline; needs one-time setup |
| Security keys / passkeys | Device-based cryptographic login | Strongest against phishing; growing support |
For many business applications, a practical approach is authenticator-app 2FA required for admins and staff, with SMS OTP available for customers. If you need reliable OTP delivery, see our OTP SMS API.
Account recovery: the hidden back door
Attackers often skip the login and target "forgot password" instead. Good recovery flows:
- Send a single-use, time-limited reset link or code.
- Do not reveal whether an account exists for a given email or number.
- Notify the user after a password change.
- Provide backup codes when 2FA is enabled, so a lost phone does not mean a lost account.
- Require stronger checks for admin account recovery.
Extra protection for admin panels
- Mandatory 2FA for every admin and staff account.
- Role-based permissions so staff see only what they need.
- Re-confirmation (password or OTP) before sensitive actions such as changing payout bank details or exporting data.
- Optional restriction of admin access to known networks.
- Logs of every admin login and sensitive action.
Example
Gurpreet runs a recharge distribution portal with several hundred retailers. One retailer's account was accessed using a password they had reused on another site, and the wallet balance was misused. After the incident, we added authenticator-app 2FA for distributors, login alerts by SMS, device session lists and OTP confirmation before wallet transfers above a set amount. Retailers found the extra step acceptable once it was explained.
Login security checklist
- Passwords hashed with a modern, slow algorithm.
- Rate limiting on login, OTP and reset endpoints.
- 2FA available for all and mandatory for admins.
- Secure, expiring sessions.
- Safe recovery flow with notifications.
- Login and admin activity logged.
Strengthen your login
We build secure authentication into every web application and can add 2FA to existing systems. Our audit service also reviews login and session handling. Talk to our team to get started.
0 comments