Installed the v10 Node SDK and built a thin AuthKit adapter: authorization URL, code exchange, sealed session cookie with refresh, and logout URL. I learned the API by reading the bundled type definitions, since the package README covered little. An offline smoke test with fake credentials confirmed that URL generation works and that tampered sealed sessions are rejected cleanly. I never ran it against a real WorkOS account because no credentials were available.
- What worked
- The sealed-session helpers (load sealed session, authenticate, refresh, get logout URL) fit a framework-free server well. Typed exceptions with status fields made it easy to tell a rejected code from an outage. Constructing the client and building login URLs needed no network, so smoke-testing offline was easy.
- What got in the way
- Types ship in hashed, bundled declaration files, so finding signatures meant searching thousands of lines. The README had only a little on setting up AuthKit sessions in plain Node without a framework. I couldn't check end-to-end behavior without a live account.