How to Authenticate and Protect Users in Custom Business Software

Why User Authentication for Custom Business Software Deserves a Dedicated Conversation
When business owners plan a custom software project — a client portal, a booking system, an internal dashboard — they spend a lot of energy on features: what the software will do, how it will look, and what data it will hold. Authentication rarely makes the agenda. It feels like a solved problem, something developers just handle. In practice, it is one of the most consequential decisions on the entire project, with direct effects on security, user experience, scalability, and the cost of maintenance for years to come.
This guide gives you a practical mental model for how user authentication for custom business software actually works — not the technical deep-dive your developers need, but the plain-English foundation you need to have informed conversations, ask the right questions, and avoid decisions that cause expensive problems later.
Authentication, Authorization, and Sessions: Three Different Things
These three words are often used interchangeably, but they describe distinct layers of the same system. Understanding the difference changes the way you think about protecting your users and your data.
Authentication answers the question: Who is this person? It is the moment the system checks whether a user is who they claim to be — typically by verifying a password, a magic link, a one-time code, or a third-party identity (like logging in with Google).
Authorization answers the question: What is this person allowed to do? Once the system knows who you are, it checks whether you have permission to view a page, submit a form, or access a record. Authorization is sometimes called access control.
Session management answers the question: How long does the system remember that I authenticated? After you log in, something needs to track that you are still logged in as you move from page to page or come back the next day. That tracking mechanism — usually a token or a cookie — is your session.
All three layers interact. A weakness in any one of them can undermine the other two. A well-designed system handles them as a connected unit, not three separate afterthoughts.
Authentication vs. Authorization
Authentication
- •Confirms who the user is
- •uses passwords, codes, or third-party identity
- •happens at login
- •one-time verification per session
Authorization
- •Controls what the user can access or do
- •uses roles and permissions
- •checked on every request
- •enforced across the whole app
How Logins Actually Work Under the Hood
When a user types their email and password into your app, a short but important sequence happens on the backend. The system looks up the stored record for that email, runs the submitted password through a cryptographic process to verify it matches what was stored, and — if it does — issues something that proves the verification happened. That proof is usually a token (a string of characters your app passes with every subsequent request) or a session cookie (a small file stored in the user's browser that the server recognizes).
Passwords themselves should never be stored in plain text. A well-built system stores only a hashed version — a one-way transformation that cannot be reversed. If a database is ever exposed, hashed passwords are vastly harder to exploit than plain-text ones. This is a baseline expectation, not a premium feature, and it is worth confirming explicitly when you review your software specification.
The choice between tokens and cookies has real trade-offs. Tokens — particularly JSON Web Tokens (JWTs) — are common in mobile apps and single-page web apps because they travel well across different domains and services. Cookies are more natural for traditional web applications and have built-in browser protections when configured correctly. Neither is universally superior; the right choice depends on your app's architecture. What matters is that your development team has made a deliberate, documented choice rather than defaulting to whatever was convenient.
Session Management: How Long Should a Login Last?
Session length is a business decision disguised as a technical one. Short sessions — where users are logged out after a period of inactivity — reduce the risk of a stolen or forgotten open session being exploited. Long sessions are more convenient for users who log in frequently. The right balance depends entirely on who your users are and what your software contains.
A consumer-facing booking app where users check in occasionally might tolerate long sessions for convenience. An internal finance dashboard used by staff should almost certainly time out after a short idle period. A client portal that holds sensitive documents sits somewhere in between.
Refresh tokens are a common mechanism for striking this balance. The system issues a short-lived access token (valid for minutes or hours) and a longer-lived refresh token that can silently generate a new access token without forcing the user to log in again. The user stays logged in seamlessly, but the window of exposure if a token is stolen stays small.
You should also plan for forced logout scenarios: what happens when a user's account is suspended, when a staff member leaves, or when a security incident requires invalidating all active sessions? These are operational realities that should be designed into the system from the start, not retrofitted under pressure.
How a Secure Login Flow Works
Multi-Factor Authentication: When You Need It and Why
Multi-factor authentication (MFA) requires a user to prove their identity with a second factor beyond their password — typically a one-time code sent by SMS, generated by an authenticator app, or delivered via email. The logic is straightforward: a stolen password alone is not enough to get in.
For software that holds financial data, sensitive client records, or administrative controls, MFA is worth serious consideration — not as an optional extra, but as a default for privileged accounts at minimum. Many businesses choose to make MFA mandatory for staff and admin roles while leaving it optional (but encouraged) for end-user accounts, which is a reasonable middle ground.
From a planning perspective, the key questions are: which user roles require MFA, which authentication methods you will support (SMS codes, authenticator apps, hardware keys), and how you will handle account recovery if a user loses access to their second factor. Recovery flows are frequently neglected in the initial spec and become a support headache later — plan them early.
Third-Party Login (OAuth and Single Sign-On)
Allowing users to sign in with an existing account — Google, Microsoft, Apple, or a company's own identity provider — is called federated login or social login. The underlying standard that makes it work is called OAuth, paired with OpenID Connect for the identity layer.
For business owners, the practical questions are: who are your users, and what accounts do they already have? A B2B platform where all users have Google Workspace or Microsoft 365 accounts is an ideal candidate for single sign-on for small business applications — users log in with credentials they already manage, and your system never stores a password at all. A consumer-facing app with a mixed audience might offer social login as one option alongside traditional email and password.
Single sign-on (SSO) at the enterprise level — where a company wants all their staff to authenticate through their own corporate identity provider — is a more involved integration but a common requirement for software sold to mid-size businesses. If you expect enterprise clients, ask your development team how SSO would be added and whether the architecture supports it without a major rebuild.
Access Control: Deciding Who Sees What
Authentication confirms who a user is. Access control determines what they can do. In custom business software, access control is where security meets business logic — and it deserves at least as much attention as the login screen itself.
If you have already read the guide on planning user roles and permissions in custom business software, you will recognize the role-based access control (RBAC) model: users are assigned roles, and roles carry specific permissions. A staff member role can create bookings; a manager role can edit any booking and run reports; an admin role can manage users and configure the system. The authentication layer verifies the identity; the role determines the access.
A few principles are worth stating plainly:
- Default to least privilege. New users should receive only the access they need to do their job. Expanding access later is easy; discovering that someone had access they should not have had is not.
- Enforce permissions on the server, not just the interface. Hiding a button in the UI is not access control. If the underlying API route does not check whether the requesting user is authorized, a motivated person can reach it directly. Server-side enforcement is non-negotiable.
- Log access to sensitive records. Knowing who accessed what and when is valuable for compliance, internal investigations, and debugging. It should be built in, not added later.
- Plan for role changes over time. Staff get promoted, responsibilities shift, and people leave. Your system needs a clear, auditable way to update roles — ideally managed through an admin interface, not by asking a developer to edit a database directly.
Common Mistakes Worth Avoiding
Most authentication failures in custom business software are not the result of sophisticated attacks — they are the result of predictable oversights made during the build. Here are the ones that appear most often.
No rate limiting on login attempts. Without limits on how many times someone can attempt a login, your login screen is open to automated attacks that try thousands of password combinations. Rate limiting — slowing down or temporarily blocking repeated failed attempts — is a basic and effective defense.
Insecure password reset flows. Password reset links that never expire, reset tokens sent in plain URLs that appear in server logs, or security questions that can be guessed are common weaknesses. A reset link should expire quickly, work only once, and be delivered over an encrypted channel.
Storing sensitive data client-side. Tokens or user data stored in places a malicious script can reach (such as browser local storage without additional protections) are vulnerable to cross-site scripting attacks. The storage strategy for authentication tokens should be an explicit decision, not a default.
No plan for account recovery. Users forget passwords and lose access to their second factor. Without a secure, tested recovery flow, you end up with locked-out users, support burdens, and pressure to take shortcuts that compromise security.
Authentication treated as an afterthought. Systems where authentication was added after the core features were built tend to have it bolted onto the outside rather than woven through the architecture. Bring it into the conversation at the planning stage, not after the first demo.
Questions to Ask Your Development Team Before You Build
You do not need to understand every technical decision your developers make, but you should be able to have a substantive conversation about the following. If a question draws a blank or a dismissive response, treat it as a signal worth following up on.
- How are passwords stored, and what hashing approach are you using?
- What is the session strategy — tokens, cookies, or both — and why is that the right fit for this app?
- How long do sessions last, and what controls do admins have to revoke access?
- Will MFA be available, and for which user roles will it be required versus optional?
- Are permissions enforced on the server side for every protected route, or only in the UI?
- How does the password reset flow work, and how quickly do reset links expire?
- Is the architecture compatible with adding SSO in the future if clients require it?
- What is logged, where is it stored, and how long is it retained?
These are not gotcha questions — they are the same questions any experienced team will expect. A team that builds complete, connected digital products should have clear, confident answers to all of them.
How Authentication Connects to the Rest of Your Software
Authentication does not live in isolation. It is the entry point for almost everything else your software does. The way sessions work affects how your API is designed. The way roles are structured affects how your admin dashboard is built. The way you handle third-party logins affects your backend architecture. The way you plan account recovery affects your support processes.
This is why it is worth addressing authentication during the planning phase, alongside your feature list and your operational requirements. If you are still mapping out what your software needs to do, the guide on mapping your business operations before you build is a useful companion — it helps you surface the user types, workflows, and data flows that authentication decisions depend on.
Getting the authentication layer right the first time is far less expensive than retrofitting it after launch. It protects your users, limits your liability, and gives your business a foundation it can grow on without accumulating security debt. That is worth a dedicated conversation early — before a single line of code is written.
If you are planning a custom software project and want to talk through how authentication fits into your specific requirements, reach out to the Vurium team — these are exactly the kinds of architectural decisions we work through with clients before the build begins.