# Login512 Post-Quantum Biometric & Passkey Authentication Platform > Login512 is the world's first Post-Quantum (PQC ML-DSA-65) Passwordless Authentication SaaS, combining Zero-Image AI Facial Liveness Verification with FIDO2 WebAuthn Passkeys. ## Core Security & Architecture Principles - **Zero-Image Privacy:** Facial video frames are processed exclusively in volatile RAM and destroyed in milliseconds. No biometric images or raw video are ever saved to disk or database. - **Post-Quantum Cryptography (PQC):** Authentication tokens are signed with NIST-standardized ML-DSA-65 (CRYSTALS-Dilithium) to resist quantum decryption attacks. - **Universal Standards:** Fully supports OpenID Connect (OIDC), OAuth 2.0 with PKCE, and FIDO2 / WebAuthn Level 3. ## Quickstart for AI Coding Agents To integrate Login512 into any web or mobile project: 1. **Frontend:** Include `https://login512.com/sdk/login512-sdk.js` and call `Login512.init({ publishableKey: "l512_pk_..." }).mountButton("#login-container", { mode: "auto" })`. 2. **Backend:** Upon receiving the token from the frontend, verify it using `POST https://api.login512.com/v1/token/verify` with header `Authorization: Bearer l512_sk_...` or through standard OpenID Connect `/oauth/token`. ## API Endpoints Summary - **OpenID Discovery:** `GET /.well-known/openid-configuration` - **JWKS Key Set:** `GET /oauth/jwks.json` (RS256 & ML-DSA-65 public keys) - **OIDC Client Registration:** `POST /oauth/register` (server-side, secret key; body needs `client_name`, `redirect_uris`, `publishable_key`) - **OAuth Authorize:** `GET /oauth/authorize` (hosted login page; issuer is `https://login512.com`; PKCE S256 required for public clients) - **OAuth Token Exchange:** `POST /oauth/token` - **OAuth User Profile:** `GET /oauth/userinfo` - **Token Verify:** `POST /v1/token/verify` (Single-use ML-DSA JTI verification) - **Passkeys Registration:** `POST /v1/passkeys/register/options` & `POST /v1/passkeys/register/verify` - **Passkeys Authentication:** `POST /v1/passkeys/auth/options` & `POST /v1/passkeys/auth/verify` - **2FA (Drop-in TOTP / Google Authenticator Replacement + Primary Upgrade):** `POST /v1/2fa/enroll-token`, `POST /v1/2fa/verify`, `POST /v1/2fa/upgrade-primary`, `GET /v1/2fa/status/{external_user_id}` - **First-Time Genesis Mode (Zero-Password Superadmin Bootstrap):** `GET /v1/genesis/status`, `POST /v1/genesis/enroll-token`, `POST /v1/genesis/claim` - **Cross-Device Bridge:** `POST /v1/bridge/create` & `GET /v1/bridge/stream` ## Model Context Protocol (MCP) Server for AI Agents Login512 provides a standardized MCP server (JSON-RPC 2.0 over stdio) for Claude Desktop, Cursor, Windsurf, VS Code (Cline/Roo Code), Antigravity, and autonomous coding agents. - **Run it (Python 3, no packages):** always the latest: `python -c "import urllib.request as u; exec(u.urlopen(u.Request('https://login512.com/sdk-ai/mcp-server/server.py', headers={'User-Agent': 'login512-mcp'})).read().decode('utf-8'))"` (Cloudflare blocks the default Python User-Agent, so keep the header); or download once: `curl -s https://login512.com/mcp-server.py -o login512_mcp.py && python login512_mcp.py`. Client config: `"command": "python", "args": ["-c", ""]` or `["login512_mcp.py"]`. Claude Code: `claude mcp add login512 -- python -c ""`. - **MCP Tools:** 1. `login512_inspect_project`: Autonomous framework detection (Next.js, React, Vue, Laravel, FastAPI, Spring Boot, Go, Flutter). 2. `login512_get_instructions`: Copy-paste ready frontend and backend integration snippets with zero hallucination. 3. `login512_list_sdks`: Full catalog of all 28 official client and server SDKs with live download endpoints. 4. `login512_audit_code`: Zero-Image privacy audit and API secret key leak detection. 5. `login512_setup_2fa_and_genesis`: Generates drop-in code for Login512 2FA (replacing 6-digit TOTP / Google Authenticator alongside legacy login + one-click Primary Upgrade) and First-Time Genesis Mode (`sdk.mount2FA()`, `sdk.shouldBypassLegacyLogin()`, `sdk.mountGenesisSetup()`). 6. `login512_smart_checkin`: The open-source Smart Check-in app (5 industry presets in one codebase), how to add an industry as one JSON file, the 3 files to copy to add Login512 to another system, and the rules that must not be broken. - **Complete MCP Setup Guide for all AI clients:** https://login512.com/mcp.html ## Smart Check-in (open-source reference app, 5 industry presets) A working check-in app and a reference integration: rotating signed QR (5-8 s) + optional on-site Wi-Fi IP lock + Login512 face / passkey. One codebase, 5 presets: `classroom`, `workplace` (clock-in/out), `event`, `checkpoint`, `dev-reference`. A new industry is one JSON file in `presets/` (no code change). - Repo: https://github.com/login512/smart-checkin (Apache-2.0) - Preset ZIPs: https://github.com/login512/smart-checkin/releases/latest - Guide for AI agents: https://raw.githubusercontent.com/login512/smart-checkin/main/AGENTS.md - Add an industry: https://raw.githubusercontent.com/login512/smart-checkin/main/docs/ADD_A_PRESET.md (`npm run check:presets`) - Reuse in ERP / POS / LMS / SaaS: copy `src/login512/client.js` (server-side verify, nonce, passkey checks), `qr-guard.js`, `genesis.js` ## Detailed Code Cookbook For comprehensive runnable code examples in React, Next.js, Vue, Angular, Svelte, PHP, Laravel, Node.js, Express, NestJS, Python, FastAPI, Django, Go, Java Spring Boot, C# .NET, Ruby, Rust, Flutter, and iOS/Android, consult: - Full Cookbook for LLMs: https://login512.com/llms-full.txt ## Security rules (Login512 API, updated 2026-11-20) - `/v1/2fa/*` require the SECRET key and are called by YOUR backend for the user who is logged in; publishable keys are rejected. In the browser use `sdk.mount2FA(selector, { externalUserId, getEnrollmentToken, verifyOnServer })`. - `sdk.shouldBypassLegacyLogin()` is only a localStorage UI hint. Never skip authentication because of it. - Passkey registration (`sdk.enrollPasskey`) needs an enrollment token minted by your backend (`POST /v1/enrollment-tokens`, secret key) for the logged-in user. - Always verify Login512 tokens on your server (`POST /v1/token/verify`, secret key) before creating a session; never trust a client-side success callback. - Genesis mode is disabled unless the operator sets `LOGIN512_GENESIS_KEY` (>= 24 random chars) on the Login512 server; there is no default key. - Only the browser SDK (`https://login512.com/sdk/login512-sdk.js`) is verified end-to-end. The iOS and React Native packages are not functional yet (they fabricate tokens); other packages are under audit. - Face liveness on a webcam is not proof against every presentation attack (e.g. a photo on a phone). Use passkeys or step-up for high-risk actions.