Skip to content

Glossary

Single sign-on (SSO)

Single sign-on is an authentication setup in which one account and its authenticators give a person access to several applications, usually through a federation protocol such as OpenID Connect or SAML. For an internal tool it means people sign in with the company account they already have, and leavers lose access when IT closes that account; Meadowstack 2.1 leaves the identity provider to you and keeps one file to swap.

By Bohuslav PoláčekChecked

templates/starter/src/auth/auth.tsx
* Sign-in, as a stub for development. It is not security: any password works
* for the people in users.ts, and the session is a person's id in
* sessionStorage (it ends when the tab closes).
*
* Replace it before the app goes live with your client's identity provider:
* Microsoft Entra ID or Google Workspace for a company's own staff (single
* sign-on, their groups mapped onto the roles in workspace/core.tsx), or
* Auth.js or Supabase Auth when the app keeps its own accounts. Keep the
* shape of this file (AuthProvider, useAuth, RequireAuth, a Person with a
* role) and the rest of the app does not change. docs/security.md has the
* steps.
The starter's sign-in says what it is: a development stub, and which providers replace it.

Why it matters in a business app

An internal tool with its own passwords is one more account to forget, reset and, worst of all, leave open after someone goes. With SSO the company's identity provider (Microsoft Entra ID, Google Workspace or another) signs people in, applies its multi-factor rules, and switches the account off on the last day for every app at once.

It also gives the app trustworthy groups: "finance" in the directory can become the approver role in the app, so roles follow the org chart instead of a spreadsheet.

How Meadowstack handles it

Truthfully, in 2.1:

  • The starter signs in with a stub for development. Any password works for the seeded people and the session is a person's id in sessionStorage. It is not authentication, and the file says so.
  • One file to replace. Keep the shape of src/auth/auth.tsx (AuthProvider, useAuth, RequireAuth, a person with a role) and the rest of the app does not change. Map the provider's groups onto the roles in workspace/core.tsx.
  • Tokens to the api. setAccessTokenSource() in shared/http.ts hands the provider's token to every call; the server takes the person from it (OpenID Connect).
  • The rest is the provider's. docs/security.md: multi-factor sign-in, password rules and lockout belong to the identity provider; sign-out ends the session on the server too; remove the stub, the person switcher and the seeded people before go-live.

Meadowstack 3.0, coming as an update to every licence, brings its own sign-in (magic link or password, TOTP and passkeys). SSO with a company directory stays a connection you configure.

Common mistakes

  • Shipping the stub. Search the project for it before go-live; the security checklist starts there.
  • Roles from the browser. The role comes from your data or the provider's claims, checked on the server, never from a field the page sends.
  • The token in localStorage. Any script on the page can read it; prefer HttpOnly cookies or the provider's library.
  • SSO without sign-out. Ending the local session but not the server's leaves a working token behind.

Sources

Questions

Does Meadowstack include single sign-on?

Not in 2.1. The starter has a development stub and one file to replace with your identity provider; the docs list Microsoft Entra ID, Google Workspace, Auth.js and Supabase Auth as typical choices.

Is SSO the same as multi-factor authentication?

No. SSO means one account for many apps; multi-factor means more than one proof at sign-in. A good identity provider does both, and SSO lets every app inherit its multi-factor rules.

Which protocol should an internal tool use for SSO?

OpenID Connect for a new web app, since it is built on OAuth 2.0 and every major identity provider offers it. SAML is still common in older enterprise setups.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app