The Short Answer
How should a SaaS product handle authentication?
Use an established identity provider or library rather than building login yourself. Offer email with passkeys or passwords plus multi-factor authentication, and social login where your users expect it. When you sell to larger organisations, add single sign-on through SAML or OpenID Connect, and user provisioning through SCIM. These are often required before an enterprise will buy.
Read the transcript
The demo went well. The buyer loves the product. Then their security team asks one question. Do you support single sign-on? For larger customers, it’s often a requirement. Staff log in with their company account, and lose access the day they leave. So what does a SaaS product need? It depends on who you sell to. For individuals: passkeys or passwords, with multi-factor authentication. And social login. For enterprises: single sign-on through SAML or OpenID Connect, and automatic accounts through SCIM. And don’t build login yourself. Use an established identity service. The security details are easy to get wrong. The costly mistake is building around individual users, then adding companies later. Model organisations from day one. Login is the first thing every user touches. And the first thing security asks about. The full guide is free at loomstrat.com.
The Terms
| Term | Meaning |
|---|---|
| Authentication | Proving who someone is |
| Authorisation | Deciding what they may do |
| Multi-factor authentication (MFA) | Requiring a second proof, such as an authenticator app, as well as a password |
| Passkey | A login credential stored on a device and unlocked with a fingerprint, face or PIN, based on FIDO2 and WebAuthn |
| OAuth 2.0 | A standard for granting an application limited access to a user’s account elsewhere |
| OpenID Connect (OIDC) | A layer on OAuth 2.0 that adds login and identity |
| SAML | An older XML-based standard for enterprise single sign-on, still widely used |
| SSO | Single sign-on: one company login used across many applications |
| SCIM | A standard for automatically creating and removing user accounts from a company directory |
Standards: OAuth 2.0, OpenID Connect, passkeys, SCIM.
Login for Individual Users
- Passkeys remove passwords and resist phishing. Support is now built into major operating systems and browsers.
- Passwords, if offered, should follow current guidance from the NCSC: allow long passphrases, check against known breached passwords, avoid forced regular changes, and pair with MFA.
- Magic links sent by email are simple for occasional users but depend on the security of the email account.
- Social login with Google, Microsoft or Apple reduces sign-up friction, especially for business users whose company runs on Google Workspace or Microsoft 365.
Enterprise Requirements
| Requirement | Why they want it | Standard |
|---|---|---|
| Single sign-on | Staff use their company login; access ends when they leave | SAML 2.0 or OIDC |
| Enforced MFA | Consistent security policy | Through their identity provider |
| Automatic provisioning | Accounts created and removed from their directory | SCIM |
| Role mapping | Directory groups decide permissions in your product | SAML attributes or OIDC claims |
| Audit logs | Who logged in and what they did | Your product |
| Session controls | Timeouts and forced logout | Your product |
Each enterprise customer connects their own identity provider, such as Microsoft Entra ID, Okta or Google Workspace. Your product must support many such connections, one per customer organisation, which ties into your multi-tenant architecture.
Build or Buy
| Option | Examples | Fits when |
|---|---|---|
| Hosted identity service | Auth0, Clerk, WorkOS, AWS Cognito, Microsoft Entra External ID | Most SaaS products; fastest route to SSO and MFA |
| Open-source identity server | Keycloak, Ory, Zitadel | You want to self-host and control data |
| Framework library | Libraries built into or added to your web framework | Simple needs; team comfortable maintaining security code |
| Fully custom | Writing login, sessions and SSO yourself | Rarely justified |
Hosted services charge per user or per SSO connection, which can become significant as you grow. Check pricing at the scale you expect, and how hard it would be to move users out later.
Common Mistakes
- Confusing authentication and authorisation. Knowing who someone is says nothing about which customer’s data they may see.
- Adding SSO late. Retrofitting organisation-level accounts into a product built around individuals is painful. Model organisations from the start.
- Weak account recovery. A password reset flow that is easier to abuse than the login defeats MFA.
- Long-lived tokens with no revocation. Plan how sessions end when a user is removed.
- No rate limiting. Login and reset endpoints attract automated attacks.
Frequently Asked Questions
What is the difference between SAML and OIDC?
Both provide single sign-on. SAML is older and XML-based and common in large enterprises. OIDC is built on OAuth 2.0, uses JSON and suits modern web and mobile apps. Many products support both.
Do I need SSO for my SaaS?
Not at the start. It becomes important when selling to mid-sized and large organisations, many of which require it.
Are passkeys ready to use?
Yes. Major platforms support them. Offer them alongside another method while users adjust.
What is SCIM?
A standard that lets a customer’s directory create, update and remove user accounts in your product automatically.
Should I build my own login system?
Usually not. Established services and libraries handle security details that are easy to get wrong.