Misar IO Docs

SDK Overview

Integrate Misar SSO and identity management into your application

What is the Misar ID SDK?

The Misar ID SDK wraps the id.misar.io/api REST API, providing:

  • SSO — Cross-TLD single sign-on across all Misar products
  • Session management — Check and refresh authenticated sessions
  • Account management — User data export and GDPR deletion

API Surface

EndpointMethodDescription
/api/sso/checkGETCheck if the current user has an active SSO session
/api/sso/initPOSTInitiate SSO — generate a redirect URL with a signed token
/api/sso/verifyPOSTVerify an inbound SSO token and exchange for a local session
/api/sso/logoutPOSTFederated logout across all Misar products
/api/session/checkGETCheck session validity and return user claims
/api/account/deleteDELETEPermanently delete a user account (GDPR right to erasure)
/api/account/exportGETExport all user data as JSON (GDPR data portability)

Available SDKs

LanguagePackage
TypeScript / JavaScript@misar/sso
Pythonmisar-sso
Gogithub.com/misarai/misar-sso-go
PHPmisarai/misar-sso-php
Rubymisar-sso gem

SSO Flow

User visits protected page on misar.dev
        ↓
Middleware calls GET /api/sso/check
        ↓ (logged in)
POST /api/sso/init → returns redirect URL with signed JWT
        ↓
User redirected to misar.dev with token
        ↓
misar.dev calls POST /api/sso/verify → creates local Supabase session

Authentication

Server-to-server calls use the shared SSO_JWT_SECRET. Client-facing calls use the user's existing .misar.io cookie session.