1.0Quick start
Sign-in for your app, fully assembled.
Latch is authentication and user management for web and mobile apps. Passkeys, email codes, social and SAML sign-on, organizations and sessions arrive as one part, already wired together.
Free up to 10,000 monthly active users. No card.
Install the SDK
One package. No peer dependencies beyond your framework.
npm install @latch/nextjsAdd two keys
LATCH_PUBLISHABLE_KEY and LATCH_SECRET_KEY, from the dashboard.
Render <SignIn />
The component in Fig. 1.1 is the result. It is live: sign in.
Sign in to Acme
Secured byLatch
header
························
payload
························
signature
························
No session yetSign in on layer 1
- ines@palletline.io2 min
- theo.w@quillbase.app9 min
- marta@okapi.health1 h
Component <SignIn /> renders in your app, on your domain. 14 kB gzipped.
Passkeys WebAuthn built in. Nothing to phish, nothing to reset.
Session A 60-second token, rotated silently and revocable at once.
Directory Every user, method and device, behind one API.
2.0Configure
Build your sign-in box. The code keeps up.
Every switch on the left is a prop. Flip one and watch the component and the listing change together; copy the listing when it looks right.
2.1Methods
2.2Appearance
- Theme
- Accent
- Radius px
Sign in to Acme
Secured byLatch
import { SignIn } from "@latch/nextjs";export default function Page() { return ( <SignIn methods={[ "email_code", "passkey", "google", "github", ]} appearance={{ theme: "light", accent: "#0e7c52", radius: 4, }} /> );}Sessions
3.0Sessions
See every session. End any of them.
A stolen laptop should be a two-second problem. Latch keeps a row per device and kills a session at the next token check, which is never more than 60 seconds away.
Device Parsed from the client on sign-in and shown in words your users recognise.
Place City-level location from the IP address. A sign-in from a new country can require a second factor.
Last seen Updated on every token rotation, so “active now” means within the last minute.
Revoke Deletes the session server-side. The next request from that device gets a 401 and the sign-in screen.
Your devices
Signed in as ines@palletline.io
- MacBook ProChrome 142Lisbon, PT85.240.18.4Active nowThis device
- iPhone 16Palletline iOS 5.2Lisbon, PT85.240.18.412 min ago
- iPad AirSafari 19Porto, PT94.132.7.201Yesterday
- Windows PCEdge 141Warsaw, PL178.42.96.133 days ago
Organizations
4.0Organizations
Roles your customers can edit without filing a ticket.
Organizations give each of your customers their own members, invitations and roles. Permissions are plain strings you check in code; the matrix below is the admin screen that ships with it.
| Permission | Owner | Admin | Member | Billing |
|---|---|---|---|---|
Invite membersmembers:invite | ||||
Remove membersmembers:remove | ||||
Edit rolesroles:edit | ||||
Manage billingbilling:manage | ||||
Create API keysapikeys:create | ||||
Read audit logaudit:read | ||||
Read patient recordsrecords:read |
await latch.can("sun", "billing:manage")→ falseSun-hee is a Member. Members do not hold billing:manage. Tick the box to grant it.
The same check runs in your API routes, in middleware and in the <Protect> component. It reads from the session token, so it costs no network call.
Integrate
5.0Integrate
Three files, whichever framework you picked.
The SDKs share one mental model: a provider at the root, a guard at the edge, a hook where you need the user. The numbered lines are the only ones you write.
Provider Wraps the app once and keeps the session fresh in the background.
Guard Runs before your code. Signed-out requests never reach a protected route.
User Typed, cached and available on the server and the client alike.
npm install @latch/nextjsimport { LatchProvider } from "@latch/nextjs";export default function RootLayout({ children }) { return ( <html lang="en"> <LatchProvider> <body>{children}</body> </LatchProvider> </html> );}import { latchMiddleware } from "@latch/nextjs/server";export default latchMiddleware({ protect: ["/app(.*)"] });export const config = { matcher: ["/((?!_next|.*\\..*).*)"] };import { currentUser } from "@latch/nextjs/server";export default async function Dashboard() { const user = await currentUser(); return <h1>Hello, {user.firstName}</h1>;}Migrate
6.0Migrate
Moving in is a checklist, not a quarter.
Import your users with their password hashes, run both systems side by side, then cut over. Nobody is signed out and nobody resets a password.
Coming from
npx latch import --from auth0 --tenant acme-prodChecklist LM-06-M
Tick the steps as you go.
Rated values
7.0Rated values
Latch · Rated values
Rev. 4 · Nov 2026
- Sign-in API availability
99.99599.995 %26 minutes of downtime in twelve months- Token verification, p50
3838 msAt the edge, in 310 locations- Sign-ins a month
412412 MAcross 9,300 production apps- Time to first sign-in, p50
1111 minFrom npm install to a real session
Measured across all production tenants, 1 Nov 2025 to 31 Oct 2026.
Field reports
8.0Field reports
Field reports
Three installations, in the words of the people who maintain them.
We deleted 4,100 lines of auth code and the on-call rota that came with them. The migration checklist was accurate to the minute, which I have never said about a vendor document.
- Stack
- Next.js, Go
- Monthly active users
- 186,000
- Moved from
- In-house (Passport)
- Cut-over
- 9 days
A hospital group asked for SAML on a Tuesday. We sent them the setup link on Wednesday.
Passkeys took our sign-in failures on mobile from 7.4% to 0.9%. We changed one prop.
Revisions
10.0Revisions
Revision history
Full changelog- Rev. 4.1218 Nov 2026AddedPasskey autofill on AndroidConditional UI now works in Chrome on Android 14 and later: saved passkeys appear in the keyboard suggestion row.
- Rev. 4.1104 Nov 2026ChangedToken verification is 41% faster at the edgeJWKS are now pinned per region. Median verification fell from 64 ms to 38 ms; no SDK update needed.
- Rev. 4.1021 Oct 2026AddedSCIM 2.0 directory sync for organizationsOkta, Entra ID and JumpCloud can now create, update and deactivate members. Business plan and above.
- Rev. 4.907 Oct 2026SecurityBreached-password check on every sign-inPasswords are compared against 1.3 billion leaked hashes using k-anonymity. Matches trigger a forced reset.
11.0
Get started
11.0Get started
Step 1 takes about a minute.
Install the SDK, paste two keys and render the component. The free plan covers your first 10,000 monthly active users, with every sign-in method switched on.
npm install @latch/nextjsIncluded on Free
- Monthly active users
- 10,000
- Passkeys, codes, links
- Included
- Social providers
- 3
- Organizations
- 5 members each
- Card required
- No