@avokwalletjs/federation-server
v0.1.0
Published
Avok federation auth server: OIDC service and origin auth for Sign in with Avok.
Downloads
99
Maintainers
Readme
@avokwalletjs/federation-server
Backend auth node for Avok federated connections: keyless OIDC, the authorize ceremony, the ROR /.well-known/webauthn document, and deployment + client-registration config. A direct (frontend-only) app never runs this; only a network operator who wants other apps to federate to its identity does.
npm install @avokwalletjs/federation-serverimport { createAuthServer, parseDeploymentConfig, parseClientRegistrations } from "@avokwalletjs/federation-server";
const server = await createAuthServer({
deployment: parseDeploymentConfig(process.env),
clients: parseClientRegistrations(process.env.AVOK_OIDC_CLIENTS_JSON),
});
server.listen(); // defaults to AVOK_AUTH_PORT or 3002createAuthServer returns an AuthServer with handle(req, res) for mounting in an existing Node http server, or listen(port?) for the standalone path. To also sponsor gas, compose it with @avokwalletjs/paymaster in the same process by routing requests to each server's handle.
This package signs id_tokens and runs the passkey ceremony. It must never receive user private keys, raw PRF output, or decrypted signing material.
Status
Unaudited; see the repository SECURITY.md.
License
MIT.
