Status: built (2026-10-05). Tests: apps/auth-broker/tests/custom-domain.test.ts, and the previous-issuer test in packages/server/tests/server.test.ts. Never exercised against a real DNS zone, a real certificate or the real Vercel API — see "Not verified for real" below.
A project can serve its sign-in on its own address — auth.yourcompany.com instead of auth.passk.in — as Auth0, Clerk, WorkOS and Supabase offer. People see your name in the address bar; the iss in your tokens is your domain; passkeys people make there are made for your domain.
What changes, and what does not
| On Passkin's address | On your domain | |
|---|---|---|
| The sign-in pages | auth.passk.in/signin/… |
auth.yourcompany.com/signin/… |
| Issuer | https://auth.passk.in/p/<publishable key> |
https://auth.yourcompany.com/p/<publishable key> — from the moment you switch the sign-in to it |
| Discovery | …/p/<pk>/.well-known/openid-configuration |
the same under the domain, and https://auth.yourcompany.com/.well-known/openid-configuration |
| Passkeys (relying-party id) | passk.in |
auth.yourcompany.com — separate from every other domain's |
| Cookies | __Host- cookies on auth.passk.in |
__Host- cookies on your domain: not shared with Passkin's |
| Social and SAML sign-in | the providers know auth.passk.in/callback/… |
unchanged — see "How a provider's redirect gets back" |
| Passkin's own address | serves the project | still serves it, with the new issuer |
The issuer keeps its /p/<publishable key> path on purpose: your SDK needs one setting (PASSKIN_URL=https://auth.yourcompany.com) and nothing else about how it finds endpoints changes.
Setting it up
- Claim the domain — dashboard Domain, or
PUT /v1/manage/projects/:pid/custom-domain {"domain":"auth.example.com"}. It must be a subdomain (a CNAME cannot sit at a domain's own address, which is where your website and mail live), a name a certificate can be issued for (no IP, no port, no path), and not one that belongs to the service or its hosting. A claim is not a right: any project may claim any name, and only a domain whose records have passed belongs to one project (in any letter case). Someone who types your domain into their project first blocks nothing — your records pass, theirs never do — and once yours have, nobody else can claim it, nor can the hosting be touched on its behalf; letting go of a claim that never passed takes nothing off the hosting. - Create two DNS records (the answer lists them):
TXT _passkin-challenge.auth.example.com = passkin-…— proves the domain is yours. Only its owner can set it.CNAME auth.example.com → <where this deployment points>— sends the domain to Passkin.
- Check — dashboard Check the records, or
POST …/custom-domain/verify. It looks up both records, in that order, and says what is missing in words ("the TXT record … does not say passkin-… yet"), then (if the operator set it up) asks the hosting for the certificate. When all of it passes the domain is ready — proved and pointed, but not served, and the issuer is still Passkin's. (Checks are limited to 30 an hour.) - Switch the sign-in to it — dashboard Switch the sign-in to …, or
POST …/custom-domain/activate. This is a step of its own because it changes your issuer: from this moment new tokens carryhttps://auth.example.com/p/<pk>asiss, and the domain is served. Do it when your apps are ready (next step); the answer showsissuer_when_activebeforehand so you know what to expect.POST …/custom-domain/deactivateundoes it, keeping the claim. - Point your apps at it, at the same time — set
PASSKIN_URL=https://auth.example.com(the SDK builds the issuer from it), or the issuer in your OpenID Connect library; loadhttps://auth.example.com/widget.js; the Swift SDK'sbaseURL. Your own servers must accept both issuers until old tokens expire (an access token lives 15 minutes by default):PASSKIN_PREVIOUS_ISSUERS=https://auth.passk.in/p/<pk>in@passkin/server/@passkin/nextjs(orpreviousIssuers), or a list of issuers in your JWT library. Passkin's own verification (/v1/me, introspection,id_token_hint) already accepts both. Refresh tokens are opaque and mint tokens under the issuer in force, so signed-in people are not signed out.
A check that fails after the domain is switched on does not take the sign-in down — a DNS hiccup must not — the error is recorded and shown, and the next passing check clears it. DELETE …/custom-domain stops serving it and releases the claim; the issuer goes back to Passkin's address with it. Tokens issued under the domain stop verifying (they expire in minutes; refresh tokens mint new ones under the restored issuer).
What is served on the domain
A request whose host is a custom domain that has been switched on is that project's sign-in and nothing else of Passkin's:
- Served: the project's own
/p/<pk>/…endpoints (authorize,token,userinfo,jwks.json,revoke,logout, discovery, device and OAuth endpoints),/signin/…,/callback/…,/sso/complete,/v1/me…(the end-user API the components call),/widget.js,/health, and the discovery aliases/.well-known/openid-configurationand/.well-known/oauth-authorization-server. - Not there (404): another project's
/p/…, the Management and Backend APIs, the operator routes, the Admin Portal, SCIM, SAML metadata and ACS, the OpenAPI document. A domain proved for one project cannot be used to reach another's pages. - A host nobody has proved is just any other host: it is not this project's and does not become so by pointing DNS at the deployment. Only the proved, active domain is ever answered as a project.
Passkeys
A passkey belongs to the domain it was made on. On your domain the hosted pages ask the browser for rpId = auth.example.com, and a passkey made there is stored with that id. A passkey made on Passkin's address is not offered on your domain, and a passkey made on your domain is refused (not just hidden) on Passkin's — the relying-party id is in what the authenticator signs. People who sign in on both end up with a passkey for each, which is how every provider with custom domains behaves (Auth0 documents the same). Related Origin Requests could share one passkey across a few domains; it is not used because browsers cap it at five labels, which a platform with many customers' domains would exhaust.
Removing the domain leaves those passkeys on file, unusable until the domain is claimed again.
How a provider's redirect gets back
Google, GitHub, Microsoft and the rest accept one redirect address for Passkin's shared credentials — https://auth.passk.in/callback/<provider> — and an enterprise identity provider is registered with https://auth.passk.in/sso/…. They cannot be changed per customer. So:
- A sign-in that begins on
auth.example.comrecords that it did (hoston the sign-in). - The provider sends the browser to Passkin's address, with a
stateand acode. - Passkin's address does nothing with them except hand the browser on to
auth.example.com/callback/<provider>with the same query — the one place this browser's cookies are — and the sign-in finishes there. For a SAML or OpenID Connect enterprise sign-in the hand-over is toauth.example.com/sso/complete, with its one-time ticket.
It hands over only to the domain that sign-in began on, only while the project still has it active, and never to an address taken from the request: the host comes from what Passkin stored. The address bar flashes Passkin's address for the length of one redirect. (If you bring your own provider credentials you can register https://auth.example.com/callback/<provider> with the provider and skip the hop; the hop is still harmless.)
Operator setup
PASSKIN_CUSTOM_DOMAIN_TARGET=cname.vercel-dns.com # where a project's CNAME points; unset = the feature is off
PASSKIN_VERCEL_TOKEN=… # lets Passkin add each verified domain to the Vercel project that serves the broker
PASSKIN_VERCEL_PROJECT_ID=prj_…
PASSKIN_VERCEL_TEAM_ID=team_… # if the project is in a team
With the token, Passkin adds the domain to the hosting itself when the checks pass — that is what makes Vercel issue the certificate — and removes it when the domain is released. Without it the dashboard says an operator will do it, and the domain stays waiting until the operator has added it by hand and the check is run again. configProblems warns about the missing token at start. The token needs access to that one project only.
The routing is by the request's host (Host, or X-Forwarded-Host behind a trusted proxy — TRUSTED_PROXY_HOPS), looked up in the database and remembered for 30 seconds: a domain that is activated or released is served or dropped everywhere within that time. The broker's own host is never looked up.
Not verified for real
- The Vercel domain calls (
POST /v10/projects/{id}/domains,GET /v9/projects/{id}/domains/{domain},DELETE …) are written from the documented API and tested against a fake. Run one real domain end to end before offering the feature, and check what an already-added domain and a not-yet-verified domain answer. - DNS is read with the system resolver (
resolveTxt,resolveCname). A domain behind a flattening CNAME (some providers) may need an ALIAS check; a subdomain is nearly always a plain CNAME. - No real certificate was issued; no browser reached a custom domain.
Not built
A second domain per project (the schema allows it; the API takes one); short endpoint paths (/authorize, /token at the domain's root, so the issuer is the bare domain — kept as /p/<pk> for SDK compatibility); a per-domain cookie Domain shared with your own site (the cookies are host-only on purpose); removing the hop for Passkin's shared provider credentials (impossible: providers hold one redirect address); WebAuthn Related Origin Requests; white-label emails from your own sender domain (mail still comes from Passkin's); the Passkin ID (the person's account center) on your domain — it stays on id.passk.in by design, it is the person's, not the product's.
Abuse
A domain you own can show Passkin's sign-in page under your branding — as with every hosted-login product, which makes a lookalike domain a phishing risk. What stands against it: the domain is proved (so it is yours and traceable to a project and workspace), every page carries its "Secured by Passkin" footer, a domain is released at once by its owner or an operator (it stops being served within 30 seconds), and the project's activity log records who claimed what. The acceptable-use terms must say that impersonating another organisation is cause for removal (owner action — legal register item 9).