Passkey as a Service: How LINKSPREED's UIID Turns WebAuthn into a Simple REST API

A deep dive into UIID's outsourced passkey engine, the open demo repository, and what it means for developers who want passwordless sign-in without becoming cryptography experts.

LINKSPREED passkeyswebauthnuiid

Passwords are the weakest link of the modern web. They get reused, phished, leaked and forgotten. Passkeys are the first replacement that is both more secure and easier for users. They are built on the FIDO2 and WebAuthn standards, and they are now supported by Apple, Google, Microsoft, 1Password and hardware keys like YubiKeys.

The standard is excellent, but implementing it correctly on the server is hard. LINKSPREED’s UIID addresses this with Passkey as a Service, also called WebAuthn as a Service. The two names mean the same thing. UIID becomes the WebAuthn Relying Party engine for your application, and your backend talks to it through a few REST calls.

To show how little code this takes, LINKSPREED published a small open demo: UIID-Passkey-as-a-Service on GitHub. This article walks through the idea, the API, the demo repository and the practical details. The feature first shipped in UIID v2.12, which you can read about in the UIID release announcement.

Why passkeys are great, and why implementing them is hard

A passkey is a cryptographic key pair. The private key stays on the user’s device, in a secure hardware enclave, a platform keychain or a security key. The public key is stored by the service. To sign in, the service sends a random challenge, the device signs it after a biometric check or PIN, and the service verifies the signature with the public key.

This design has strong properties:

  • There is no shared secret on the server that can leak in a breach.
  • Passkeys are bound to the website’s domain, so phishing sites cannot use them.
  • The user only needs Touch ID, Face ID, Windows Hello or a security key.

The server side, however, has many moving parts. A correct Relying Party implementation must:

  • Generate unpredictable challenges and store them per session.
  • Build valid credential creation and request options.
  • Parse CBOR-encoded attestation objects and authenticator data.
  • Verify the origin, the RP ID hash, flags, signature counters and signatures across several algorithms.
  • Store credential IDs and public keys safely and link them to the right user.
  • Handle edge cases such as multiple devices, discoverable credentials and different authenticator types.

A mistake in any of these steps can silently weaken security. Many teams want passkeys but do not want to own this complexity.

What Passkey as a Service means

UIID’s answer is to outsource the Relying Party role. In the UIID API documentation this is described as an outsourced WebAuthn engine: UIID acts as a full WebAuthn Relying Party provider for external applications. You delegate passkey creation, challenge generation and cryptographic assertion verification to UIID, without writing complex server-side cryptography. The full reference is in the UIID API docs.

In practice:

  • Your app keeps its own user accounts, sessions and business logic.
  • Your backend calls four UIID endpoints with its client credentials.
  • The browser talks to your backend and uses the standard navigator.credentials API.
  • UIID generates the challenges, verifies the attestation and assertion responses, and stores the passkeys.

You decide who your users are. UIID answers one question: did this person prove possession of a valid passkey?

Where it came from: UIID v2.12

The feature arrived in v2.12, “Passkey Authentication & WebAuthn Provider Protocol”, as described in the UIID release announcement. That release contained two related things.

First, passkeys for UIID itself. UIID gained full FIDO2/WebAuthn support across Apple Touch ID and Face ID, Google Password Manager, Windows Hello, 1Password and YubiKeys. Users can sign in with one-click discoverable (usernameless) passkeys or with an identifier-first flow. They can also register a zero-password account directly with biometrics on /register.

Second, UIID WebAuthn-as-a-Service. UIID itself became an outsourced WebAuthn Relying Party authentication engine. Third-party developers can register RP applications in the Passkey Vault at /dashboard/passkeys, receive API credentials, and delegate FIDO2 passkey registration and assertion signature verification to UIID through the /api/v1/passkey-provider/* REST APIs.

The same release also shipped:

  • Granular passkey security preferences.
  • Cross-device sync and recovery guidance.
  • Mobile UX improvements, including a floating footer that hides on scroll down and returns on scroll up.
  • Hardening of account recovery, step-up re-authentication middleware, dual-control administrative approval queues and session protection.

UIID has since moved on to v2.14, which added Enterprise SSO and white-label portals. The passkey provider has been part of the platform for several versions now, and it is documented as a first-class section of the API.

The architecture: three parties, four calls

Passkey as a Service involves three parties:

  • The browser (the user’s device and authenticator).
  • Your backend (the application that wants passkey login).
  • UIID (the Passkey Provider).

Registration and sign-in each take two steps, “begin” and “finish”:

StepYour backend calls UIIDBrowser does
Register, beginPOST /api/v1/passkey-provider/register/beginReceives creation options
Register, finishPOST /api/v1/passkey-provider/register/finishCalls navigator.credentials.create() in between
Sign in, beginPOST /api/v1/passkey-provider/authenticate/beginReceives request options
Sign in, finishPOST /api/v1/passkey-provider/authenticate/finishCalls navigator.credentials.get() in between

Your backend sits in the middle as a thin proxy. Its most important job is protecting the client secret. The credentials identify your application to UIID and must never be exposed to browser code.

The API in detail

Getting credentials

You register your application in the Passkey Vault at /dashboard/passkeys. UIID then issues a client ID (shown in the docs with a pk_app_... prefix) and a client secret (sk_app_...).

Begin registration

POST /api/v1/passkey-provider/register/begin initiates passkey creation for an external application user. The request body contains:

{
  "client_id": "pk_app_...",
  "client_secret": "sk_app_...",
  "external_user_id": "usr_98765",
  "external_user_name": "[email protected]"
}

The external_user_id is your own identifier for the user. The response contains a session_id and the WebAuthn options:

{
  "session_id": "dev_reg_...",
  "options": {
    "publicKey": {
      "rp": { "name": "Your App", "id": "yourapp.com" },
      "user": { "id": "...", "name": "[email protected]" },
      "challenge": "..."
    }
  }
}

The session_id ties the begin and finish calls together. The options.publicKey object is what the browser needs for navigator.credentials.create().

Finish registration

After the browser has created the credential, your backend sends the result to POST /api/v1/passkey-provider/register/finish:

{
  "client_id": "pk_app_...",
  "session_id": "dev_reg_...",
  "external_user_id": "usr_98765",
  "external_user_name": "[email protected]",
  "credential": { /* browser navigator.credentials.create() result */ }
}

UIID validates the attestation response and stores the passkey. A success response looks like this:

{
  "status": "success",
  "passkey": {
    "id": "...",
    "external_user_id": "usr_98765",
    "created_at": "2025-05-15T12:00:00Z"
  }
}

Authenticate

For sign-in, you call /authenticate/begin with the external_user_id to receive assertion options. Then you call /authenticate/finish with the signed credential. The path pattern in the docs is /api/v1/passkey-provider/authenticate/*. UIID performs the passkey assertion verification for you.

The whole provider surface is four endpoints, and all of them are plain JSON over HTTPS.

Hero Image

The demo repository, step by step

The repository linkspreed/UIID-Passkey-as-a-Service is a deliberately small demo. Its README describes it as a lightweight application showing passkey authentication powered by UIID Passkey-as-a-Service, with zero external npm dependencies. It uses only Node.js 20+ built-ins: http, crypto and native fetch.

The project structure is minimal:

.
├── server.js            # Node.js 20+ HTTP server proxying WebAuthn API calls to UIID
├── public/
│   └── index.html       # WebAuthn frontend UI & browser credentials integration
├── Dockerfile           # Minimal Node 20 Alpine container image definition
├── docker-compose.yml   # Docker Compose setup
└── LICENSE              # Project license

The license is MIT, as noted in the repository.

The backend: server.js

The server does three things: it holds the credentials, maps your usernames to stable IDs, and forwards four routes to UIID.

Configuration. The base URL of the UIID API can be overridden through UIID_BASE_URL, and the port through PORT (default 3000). The provider path is built from the base URL:

const PROVIDER = `${UIID_BASE_URL}/api/v1/passkey-provider`;

Stable user IDs. UIID needs an external_user_id. The demo derives one deterministically from the username:

function externalUserId(username) {
  return "usr_" + crypto.createHash("sha256").update(username).digest("hex").slice(0, 16);
}

The same username always produces the same ID, so a user can register on one visit and sign in on the next. In a real application you would use your own database primary key instead.

One helper for every call. A single function posts JSON to UIID and returns the status and parsed body. It logs the request and a truncated response, which is useful while learning:

async function callUiid(endpoint, payload) {
  const url = `${PROVIDER}${endpoint}`;
  const res = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json", Accept: "application/json" },
    body: JSON.stringify(payload),
  });
  // ... parse JSON, log, return { status, data }
}

Four routes. The route table maps your own API to the UIID API:

const routes = {
  "/api/register/begin":  (b) => callUiid("/register/begin",     { ...credentials, external_user_id, external_user_name }),
  "/api/register/finish": (b) => callUiid("/register/finish",    { ...credentials, session_id, external_user_id, external_user_name, credential }),
  "/api/login/begin":     (b) => callUiid("/authenticate/begin", { ...credentials, external_user_id }),
  "/api/login/finish":    (b) => callUiid("/authenticate/finish", { ...credentials, session_id, external_user_id, credential }),
};

The browser never sees the client secret. It only calls your four routes, and your server adds the credentials before forwarding to UIID. The whole server is a plain http.createServer that serves public/index.html, handles the four POST routes and returns JSON errors.

The frontend: public/index.html

The page has a username field and three buttons: Register passkey, Sign in with passkey and Clear log. A status line shows success or failure, and a log panel prints every request and response as JSON. The log makes the demo a good teaching tool, because you can watch exactly what flows between the browser, your backend and UIID.

The script handles the details that trip up many first-time WebAuthn implementations.

Base64url conversion. WebAuthn uses binary ArrayBuffer values, while JSON carries strings. Two helpers, b64ToBuf and bufToB64url, convert between them.

Flexible option parsing. The helper extractPublicKey accepts several response shapes: { options: { publicKey } }, { options } or { publicKey }. This makes the frontend tolerant of small differences in response format.

Preparing options for the browser. prepCreate and prepGet clone the options and convert the challenge, the user ID and the credential ID lists into buffers:

function prepCreate(pk) {
  pk = structuredClone(pk);
  pk.challenge = b64ToBuf(pk.challenge);
  pk.user.id = b64ToBuf(pk.user.id);
  (pk.excludeCredentials || []).forEach(c => c.id = b64ToBuf(c.id));
  return pk;
}

Serializing the result. serializeCredential turns the browser’s credential object back into JSON-safe values. It handles both cases: for registration it includes attestationObject and the transports, and for sign-in it includes authenticatorData, signature and userHandle. It also passes along authenticatorAttachment and the client extension results.

The two flows. The registration handler calls /api/register/begin, runs navigator.credentials.create(), serializes the result and sends it to /api/register/finish. The sign-in handler mirrors this with navigator.credentials.get():

const begin = await api("/api/login/begin", { username });
const publicKey = prepGet(extractPublicKey(begin));
const cred = await navigator.credentials.get({ publicKey });
const credential = serializeCredential(cred);
await api("/api/login/finish", { username, session_id: begin.session_id, credential });
status("Signed in successfully", true);

Not much code is needed because the hard part, verifying the cryptography, happens at UIID.

Running the demo

From the README, the quickest path is local Node.js:

git clone https://github.com/linkspreed/UIID-Passkey-as-a-Service
cd UIID-Passkey-as-a-Service
UIID_CLIENT_ID="your_client_id" UIID_CLIENT_SECRET="your_client_secret" node server.js

Then open http://localhost:3000.

With Docker:

docker build -t uiid-passkey-demo .
docker run -p 3000:3000 -e UIID_CLIENT_ID="your_client_id" -e UIID_CLIENT_SECRET="your_client_secret" uiid-passkey-demo

Or with Docker Compose:

docker compose up --build

The README lists these environment variables:

VariableDefaultDescription
UIID_CLIENT_ID (or CLIENT_ID)emptyYour UIID Passkey Provider client ID
UIID_CLIENT_SECRET (or CLIENT_SECRET)emptyYour UIID Passkey Provider client secret
UIID_BASE_URLthe UIID API hostBase URL of the UIID service API
PORT3000Port the demo server listens on

You need Node.js 20 or higher for native fetch. Docker is optional.

What users experience on the UIID side

The passkey features in v2.12 also include settings for the end user, as described in the UIID release announcement.

Passkey login modes. In Security Settings at /dashboard/security, users can choose between Both, Discoverable Only and Identifier-First Only. They can also require a step-up email OTP as second factor on passkey login.

Sync and recovery guidance. The release added clear explanations of three things:

  • Hardware enclave binding.
  • OS cloud keychain syncing through iCloud or Google.
  • Moving access to another device with an encrypted .uiid file export, a cross-device QR scan or a recovery key.

This is an important part of passkey adoption. The question “what happens if I lose my phone?” decides whether people trust the system.

Hero Image

How passkeys fit into the wider UIID platform

Passkey as a Service is one piece of a larger identity layer. The UIID API docs describe UIID as a zero-trust, passwordless identity layer built on sovereign identity principles, with these building blocks:

  • Core ID and aliases. The Core ID is the permanent anchor of a user’s digital identity. Aliases are contextual sub-identities, isolated per application.
  • OIDC and dynamic OAuth. /oauth/authorize lets users grant scopes selectively, mark required scopes and choose between permanent and 15-minute single-execution grants. Standard endpoints include /oauth/token, /oauth/userinfo, the OIDC discovery document and JWKS.
  • Enterprise SSO (new in v2.14). White-label portals, inbound corporate directories such as Azure AD, Okta or SAML 2.0, and UIID as an outbound SSO provider. UIID can also act as a master IdP bridging into legacy SAML, LDAP or Active Directory environments through Keycloak.
  • MCP server. UIID implements the Model Context Protocol over HTTP and SSE, so AI assistants and agents can securely query identity data.
  • Alias challenges and webhooks. Short-lived signed challenges for aliases, and HMAC-signed webhooks for identity events.

The combination is the interesting part. A developer can use UIID only as a passkey engine, only as an OIDC identity provider, or both. If you start with Passkey as a Service today, the rest of the platform stays available later.

From demo to production

The demo is intentionally minimal, and a few things deserve attention before going live.

Keep credentials out of the code. The demo’s server file has constants for the client ID and secret with a reminder to regenerate them after testing. The README documents the better approach: pass them through environment variables. Never commit credentials, and rotate them if they were ever exposed.

Never expose the client secret to the browser. The proxy pattern in server.js exists for this reason. Keep it.

Use your own user IDs. Replace the hash-of-username approach with your real database user ID, so that renaming an email address does not orphan a passkey.

Create your own session after success. The demo shows “Signed in successfully” in the UI. In a real application, your backend should treat a successful /authenticate/finish as proof of identity. It should then issue its own session cookie or token and keep the usual protections around it.

Check your RP configuration. WebAuthn binds passkeys to a domain. The registration options in the docs contain an rp object with a name and an ID. Make sure the RP details configured for your application match the domain where users will sign in, and always serve production pages over HTTPS. Browsers allow localhost for development.

Add validation and error handling. The demo checks that a username exists. A production service should also validate input, limit request rates on its own routes and handle UIID error responses cleanly.

Plan for recovery and multiple devices. Offer users a way to register more than one passkey and a recovery option, so a lost device does not mean a lost account.

Who benefits

  • Startups and small teams get passkey login without learning the details of CBOR, attestation formats and signature verification.
  • Teams with existing user systems can add passkeys next to their current login rather than rebuilding everything.
  • Security-minded teams reduce risk by not hand-writing verification code.
  • Developers exploring passwordless can run the demo in minutes and read all of its code in one sitting.

Because the demo has no npm dependencies, there is no supply chain of packages to audit before you try it.

Getting started

  1. Read the Passkey Provider section of the UIID API docs.
  2. Register your application in the Passkey Vault at /dashboard/passkeys and note your client ID and secret.
  3. Clone the demo from GitHub and run it with Node.js or Docker.
  4. Register a passkey, sign in and watch the log panel to understand each step.
  5. Copy the four-route pattern into your own backend, using your own user IDs and sessions.

You can follow the release history, including the v2.12 passkey release and later updates, in the UIID release announcement. The main entry point is uiid.me.

Conclusion

Passkeys are the future of sign-in, but implementing them yourself is demanding work. With Passkey as a Service, LINKSPREED turns UIID into a WebAuthn engine that any developer can call with four REST requests. The open demo repository shows the complete pattern in one small Node.js server and one HTML page, with no third-party dependencies, plus Docker support for quick tests. Since the feature arrived in v2.12, UIID has grown further with enterprise SSO and MCP support. For teams that want passwordless authentication without the cryptographic overhead, it is a practical starting point.