Documentation

SDKs

Official SharkAuth client libraries. Two languages, identical surface. Honest endpoint coverage: 56% of all SDK-callable backend routes, ~85% of the launch-critical agent-platform + OAuth core path. See Coverage below.

LanguagePackageImport
Pythonshark-authfrom shark_auth import Client
TypeScript@sharkauth/sdkimport { SharkClient } from '@sharkauth/sdk'

Both wrap the same HTTP API. Most methods exist in both SDKs under the camelCase / snake_case equivalent, but a few parity gaps remain (see table below).

Sections

Foundations

  • Getting started — install, env vars, first call
  • Authentication — signup, login, sessions, password reset, magic links
  • MFA — TOTP enroll / verify / challenge / recovery codes
  • Sessions — list and revoke active user sessions
  • Errors and retries — exception hierarchy, retry strategy

OAuth surface

Agent platform (flagship)

  • Delegation and agents — register agents, may_act, act chain, DPoP-bound tokens
  • DPoP primitivesDPoPProver, key rotation, cnf.jkt binding
  • Vault — broker third-party OAuth tokens (Linear / Slack / Gmail / Microsoft / custom)

Admin

  • API keys — admin key CRUD + rotate
  • Organizations — org CRUD + members + invitations
  • RBAC — roles, permissions, assignments
  • Audit logs — query, export, purge
  • Webhooks — register, verify signatures, replay

Cookbook

Versioning

Both SDKs ship at 0.1.0. The TypeScript build emits ESM + CJS + DTS (~280 KB total).

Coverage

Honest accounting

The backend exposes 236 total routes, but not all are SDK-callable. Excluding /healthz, the SPA shell, .well-known/*, /api/docs, static assets, redirects, and catch-all handlers, the meaningful denominator is 130 SDK-callable endpoints.

Against that denominator:

SDKEndpoints wrappedRaw coverage
Python73 / 13056%
TypeScript71 / 13055%

If you exclude the ~40 endpoints that are admin-panel-only (driven exclusively by the dashboard UI and not part of any documented SDK use case), the closest favorable read is 73 / 90 = 81% for Python.

Coverage by area

Of the launch-critical path (agent platform plus OAuth core), coverage is ~85%. That is the wedge. Everything an agent author or OAuth integrator needs on day one is wrapped. Admin-panel parity, flow builder authoring, and SSO connection management lag and are explicitly post-launch.

AreaPythonTypeScriptStatus
Auth (signup / login / sessions / password / magic link)100%100%Y
OAuth core (token, revoke, introspect, refresh, PKCE, DCR, device flow, token exchange)~95%~95%Y
Agents (register, list, rotate, revoke)100%100%Y
Delegation (may_act, act chain, DPoP-bound tokens)100%100%Y
Vault (broker tokens, list, refresh)~70%~70%Partial
Audit (query, export, purge)100%100%Y
Webhooks (register, verify, replay)100%100%Y
Admin Apps (CRUD)~80%~80%Y
RBAC (roles, permissions, assignments)100%100%Y
Orgs (CRUD, members, invitations)100%100%Y
Proxy (admin proxy config + policy)~60%~60%Partial
Email / Templates~50%~50%Partial
SSO (connection management)0%0%N
Passkeys (WebAuthn registration / auth)0%0%N
Flow Builder (CRUD)0%0%N

Roadmap to 90%+

The gap between today's 56% raw coverage and 90%+ is concentrated in four shippable groups, in this priority order:

  1. Passkeys (WebAuthn registration + authentication endpoints).
  2. Vault user-connect + provider-CRUD (provider templates, user connect / disconnect, provider-level admin).
  3. SSO connection management (create / list / update / delete connections, IdP metadata).
  4. Flow Builder (CRUD on flows + steps).

Tracking and the full post-launch backlog live in sdk/HANDOFF.md. Other notable not-yet-shipped items: admin SSE log stream and signing-key rotation.

How the two SDKs relate

ConcernPythonTypeScript
Top-level clientClient(base_url, token)new SharkClient({ baseUrl, adminKey })
Namingsnake_casecamelCase
HTTP backendrequestsglobal fetch
Cryptocryptography, PyJWTglobalThis.crypto.subtle, jose
Token exchangeOAuthClient.token_exchangeexchangeToken(...) (free fn)
Webhook signatureverify_signatureverifySignature (async)
JWT verifydecode_agent_token (full)Not yet exported — decode manually
Browser-safen/ayes, except DPoP key PEM round-trip