SDKs
SeekAuth is a standard OpenID Provider, so no SDK is required: any OpenID Connect or OAuth 2 library that speaks the authorization code flow with PKCE works from the discovery document, and any JWT library verifies the access tokens against the published keys. The SDKs do the parts that are specific to SeekAuth, such as the login that opens on your own page, DPoP-bound tokens in the browser, and the account settings components.
| SDK | Language | For |
|---|---|---|
@seek-services/auth-react |
React 18 or 19 | The provider, the login modal, a store with the session, and settings components for passkeys, two-step login and linked accounts. Built on auth-js. |
@seek-services/auth-js |
TypeScript, any browser framework | The browser core: PKCE, DPoP, token storage and refresh, the embedded login’s challenge client, the account API. No runtime dependencies. |
auth-client |
Rust (axum 0.7) | Verifying access tokens and DPoP proofs in an API, the backend half of a web client (sessions in your database, an HttpOnly cookie in the browser), machine-client tokens, and webhook signatures. |
The two npm packages are released together and always carry the same version. auth-client is at version 0.1.0.
Installing
Section titled “Installing”The JavaScript SDKs are on npm. For a React app:
npm install @seek-services/auth-reactIt brings @seek-services/auth-js with it, and needs react and react-dom 18 or 19 in the app. Without React:
npm install @seek-services/auth-jsBoth are ES modules with their TypeScript types, for current browsers (Web Crypto, IndexedDB). An app that imports from auth-js beside auth-react, errorFromResponse for one, names both in its package.json at the same version, so that it gets one copy of auth-js and its errors are the classes auth-react throws.
The Rust crate is not on crates.io. Add it from the SeekAuth repository: by path, from a checkout next to your app, with the web feature if the backend is a web client:
[dependencies]auth-client = { path = "../auth/crates/auth-client", features = ["web"] }or as a git dependency pinned to a commit of the repository, which cargo needs read access to:
[dependencies]auth-client = { git = "https://github.com/seek-services/auth", rev = "<commit>", features = ["web"] }The crate needs axum 0.7, reqwest 0.12 and (with web) sqlx 0.8 with Postgres; see its requirements.
Which one
Section titled “Which one”- A single-page app (React, or anything in the browser) holds its own tokens: use auth-react, or auth-js without React. See the SPA quickstart.
- An app with its own backend that should keep tokens off the browser: auth-react with the
backendprop on the page, andauth-client’sWebClienton the server. See the web backend quickstart. - An API that receives access tokens:
auth-client’sAuthUserextractor, or any JWT library. See Protect an API. - A job or service with no user: a machine client and
auth-client’sMachineClient, or a plainPOST /token. See the machine client quickstart.