Skip to main content
Bludia doesn’t require an SDK. This ~100-line client covers what most apps need. Copy it into src/lib/bludia.js.
src/lib/bludia.js

Usage

Notes

  • Uses Vite-style import.meta.env. For Create React App use process.env.REACT_APP_*; for Next.js client code use process.env.NEXT_PUBLIC_*.
  • The refresh token is kept in localStorage for simplicity. For stricter security, keep it in an httpOnly cookie set by your own server. See Sessions & tokens.
  • Refresh tokens rotate, so the client stores the new one after every refresh and shares one refresh between parallel requests.