@sparkvault/sdk-js 16.0.1 → 16.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -115,6 +115,8 @@ app.post('/api/auth/login', async (req, res) => {
115
115
 
116
116
  - A sign-in token lives 300 s. Its claims, and the full rule a verifier applies: [Identity API reference](https://sparkvault.com/api/docs/sdk-js/#identity-api-reference); in the monorepo, `docs/SDK.md` → Verifying a sign-in token.
117
117
  - `signIn()` resolves only when the person signs in. Cancelling inside the sign-in window, or dismissing the SDK's dialog, rejects with `UserCancelledError` (`code` `user_cancelled`); a blocked or closed popup leaves the dialog open with Try again.
118
+ - An account that signs its people in with its own identity provider gets a "Continue with {name}" button on the sign-in page, first among its methods. `signIn({ method: 'federation' })` (or `attach(selector, { method: 'federation' })`) starts it directly. Such a sign-in's `identityType` is `federated`: key the person by the SVID, like every other.
119
+ - **For typed callers:** `method?: 'federation'` is an option of `VerifyOptions` (so of `signIn()`'s `SignInOptions`) and of `attach()`'s `IdentityAttachOptions`. `VerifyResult.identityType` and `TokenClaims.identity_type` include `'federated'`, so a `switch` on them with no `default` (or a `never` check) must handle it. `TokenClaims.email` / `email_verified` are present only on a federated token whose provider asserted an address: an attribute, never a key. `VerifyOptions.signinRef` and `VerifyOptions.completesInWindow` are internal: SparkVault's sign-in pages set them, never a site, and `SignInOptions` leaves them out.
118
120
  - To have SparkVault own sessions (refresh rotation, revocation, logout), run OIDC with a backend-for-frontend instead: [Quick Start (OIDC)](https://sparkvault.com/api/docs/products/identity/#quick-start-oidc).
119
121
 
120
122
  ## Modules