@tinycloud/web-sdk 3.9.0-beta.8 → 3.9.0-beta.9
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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/tcw.d.ts +15 -0
- package/package.json +1 -1
package/dist/modules/tcw.d.ts
CHANGED
|
@@ -212,6 +212,8 @@ export declare class TinyCloudWeb {
|
|
|
212
212
|
private signOutCount;
|
|
213
213
|
/** The signer set with `setRuntimePermissionSigner`, with the session it was set for. */
|
|
214
214
|
private runtimeSigner?;
|
|
215
|
+
/** Set when this instance's session was established through the configured OpenKey client; bound to that session like `runtimeSigner`. */
|
|
216
|
+
private openkeySession?;
|
|
215
217
|
private signOutInFlight;
|
|
216
218
|
private persistedRestoreBlocked;
|
|
217
219
|
private signOutCleanupFailed;
|
|
@@ -488,6 +490,19 @@ export declare class TinyCloudWeb {
|
|
|
488
490
|
* `requestPermissions` calls this; sign-in and session setup never do.
|
|
489
491
|
*/
|
|
490
492
|
private runtimeMessageSigner;
|
|
493
|
+
/**
|
|
494
|
+
* Whether the OpenKey client may sign a runtime grant: always, unless there is POSITIVE evidence that it is not connected. It may sign when
|
|
495
|
+
* this instance's session was established through it (and is still the live session), or when its in-memory `lastAuth` is set (`connect()` ran
|
|
496
|
+
* on this client, for example because the app connected it after a restore), or when it exposes no `lastAuth` at all (a client shape this SDK
|
|
497
|
+
* does not know: today's behaviour, fail open). `lastAuth` is read here because nothing public says it: `@openkey/sdk` 0.12.2 declares
|
|
498
|
+
* `lastAuth = null`, sets it in `connect()` and clears it in `signOut()`; 0.9.0 declares it and sets it in `connect()` but has no `signOut`.
|
|
499
|
+
* `getSessionToken()` always answers null in 0.12.2 and `isConnected()` reads the OpenKey cookie, which can be true when `connect()` never ran
|
|
500
|
+
* on this page. web-sdk documents `@openkey/sdk` >= 0.12.2, so 0.12.2 is the lowest version this was checked against. The clean fix is
|
|
501
|
+
* `signMessage()` rejecting when not connected, in `@openkey/sdk`. Trade-off: an app that connects through a DIFFERENT OpenKey instance than
|
|
502
|
+
* `config.openkey.client`, or restores after an authorize-only sign-in, must call `openkey.connect()` on the configured client or
|
|
503
|
+
* `setRuntimePermissionSigner`.
|
|
504
|
+
*/
|
|
505
|
+
private openkeyClientMaySign;
|
|
491
506
|
/**
|
|
492
507
|
* Sets the signer for runtime permission grants (`requestPermissions`, and the panel's "allow" buttons), or clears
|
|
493
508
|
* it with no argument. For apps whose sign-in is not the SDK's OpenKey flow, for example a restored session whose
|
package/package.json
CHANGED