Auth
Add social sign-in and verification codes to your app.
npx extraorbital add authlockerAuthLocker verifies the user. Your app must create its session.
- 01 / Run the commandGet the service
- 02 / Read your .envUse its credentials
- 03 / Connect your appCall the SDK or API
Limits
| Limit | Free · Prototype | Paid |
|---|---|---|
| Requests | Fair use | Included |
| Spend | Shared SMS ceiling | Shared team credit or budget |
Free allowances are shared across the account. Provider limits still apply on paid plans.
Use it
Verify users on your server. The API requires a client secret and does not allow browser requests:
import { createAuthLockerHandler } from "@authlocker/next";
export const { GET, POST } = createAuthLockerHandler({
capabilities: ["socials.google", "socials.github", "otp.email"],
async onUserVerified(request, user) {
// user: { method, provider, sub, email, emailVerified, name, picture }
// Write your session cookie here — this response is the one that carries it.
},
});Add the client provider:
import { AuthLockerNextProvider } from "@authlocker/next/client";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return <AuthLockerNextProvider>{children}</AuthLockerNextProvider>;
}Get sign-in components and generated integration code at authlocker.dev/components.
Environment variables
The CLI writes these to .env or an existing .env.local.
| Variable | Purpose |
|---|---|
AUTHLOCKER_CLIENT_ID | App client ID |
AUTHLOCKER_CLIENT_SECRET | Private server credential |
AUTHLOCKER_ISSUER | OIDC issuer and discovery origin |
Specifics
Options
npx extraorbital add authlocker [--slug <name>]| Flag | Default | Description |
|---|---|---|
--slug | default | A second, fully separate client |
Use one client per app. User IDs are specific to a client; a second client receives different IDs for the same people.
Callbacks and user IDs
The first non-localhost callback URL is fixed per provider. Later requests must match it. Localhost does not fix a callback. Use one client per app: user IDs differ between clients.
Pricing
| Usage | Paid rate |
|---|---|
| Requests | Included |
| Spend | At cost |
See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗
SMS is passed through at cost and varies by destination. Prototype SMS uses a shared daily limit.