tkhq / sdk

Turnkey TypeScript SDK
Apache License 2.0
48 stars 12 forks source link

enable passkey sessions #282

Closed andrewkmin closed 3 months ago

andrewkmin commented 3 months ago

Summary & Motivation

See iteration cycles on https://replit.com/@andrew306/RepulsiveRundownObject#index.ts

This flavor of creating passkey sessions assumes that you've created the suborg already and know their suborg ID.

This does not encapsulate logic to, say, create a new suborg and have a fresh passkey session for them out of the gate. However, the abstraction is there: you could call createEmbeddedAPIKey, grab the resulting public key and include it as a user's API key within a CreateSubOrganization call.

Note that this depends on hpke-js which is not available in some environments (such as react native). We'll have to do some followup work there to get native support at a later time.

How I Tested These Changes

Did you add a changeset?

If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

codesandbox-ci[bot] commented 3 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

socket-security[bot] commented 3 months ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/hpke-js@1.2.7 None +2 1.74 MB dajiaji

View full report↗︎