SeleID SDK
SeleID client SDK
Overview · React Native and Expo · Android · iOS · Register an app · API reference · Errors and security · Changelog
Available @seletech/seleid-client is published on npm.
The SDK is a dependency-free TypeScript library for serverless and edge runtimes, Node 22+ and React Native or Expo. It talks to https://auth.seleid.dev, validates every response against JSON Schemas, and never hangs: every call has a hard timeout and a typed failure.
What works today and what is planned
| Capability | SDK 0.1.0 | SeleID server today |
|---|---|---|
| Discovery and JWKS fetch | Built (discovery, jwks) | Live |
| Authorization code exchange | Built (exchangeCode) | Live, first-party apps only |
| Refresh with single-flight rotation | Built (TokenManager) | Live, first-party apps only |
| Token storage | Built (TokenStore, SecureStoreTokenStore, MemoryTokenStore) | Not applicable |
| Authorize URL and PKCE helper | Planned (not in 0.1.0; see the quickstart for app-side code) | Live |
| Local access-token verification | Built (createVerifier) | Planned: access tokens are opaque today, not JWTs |
Online session check (sessionContext, SessionGuard) | Built | Planned: /v1/session/context does not exist yet |
| Devices, preferences, account events | Built (listSessions, revokeSession, revokeAllSessions, getPreferences, patchPreferences, listEvents) | Planned: endpoints not deployed |
| Test double | Built (FakeSeleId) | Not applicable |
| Registered apps from developers signing in | Not applicable | Planned: apps stay pending review |
| Native Kotlin and Swift SDKs, a web button, Flutter, Python and PHP libraries | Planned | Not applicable |
| Sandbox with test accounts, sample project, hosted API reference | Planned | Not applicable |
Because the server pieces marked Planned are not deployed, sessionContext, SessionGuard sensitive checks and local verification return typed errors (for example unauthenticated or unavailable) against production today. The SDK fails closed rather than pretending the account is fine.
Install
npm install @seletech/seleid-client
How sign-in works
- Your app opens
https://auth.seleid.dev/authorizein the system browser with a PKCE challenge. - The person signs in and SeleID redirects back to your registered
redirect_uriwithcodeandstate. - Your app calls
client.exchangeCode(...)and stores the returned tokens. TokenManagerrefreshes them;SessionGuardchecks the session before sensitive actions.