@apteva/web-sdk 0.9.0 → 0.10.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/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## 0.10.1
2
+
3
+ - Keep an active managed Auth session after Auth explicitly reports a retryable
4
+ pre-commit refresh failure. Continue to reject the failed request and retry
5
+ refresh on a later request.
6
+ - Treat only `401 invalid_grant` as definitive refresh rejection. Retain an
7
+ uncertain marker for generic 401, timeout and proxy errors so a single-use
8
+ credential cannot be replayed.
9
+ - Add credential-free `onDiagnostic` refresh outcomes and session-clear reasons.
10
+
11
+ ## 0.10.0
12
+
13
+ - Add generic opt-in managed Auth persistence (`auth.persistence: "local"`),
14
+ `auth.restore()`, credential-free restoration state, and `auth.dispose()`.
15
+ - Persist only refresh credentials and versioned scope/session metadata. Keep
16
+ access tokens and authoritative identity/permissions in memory.
17
+ - Coordinate same-origin tabs with Web Locks, notifications and durable refresh
18
+ markers; reject unsafe reuse after lost responses, crashes or uncertain commits.
19
+ - Preserve memory-only defaults, explicit app credential selection and no write
20
+ replay. Browsers without Web Locks/storage use memory-only login.
21
+ - No implicit legacy-format import; adoption requires one login.
22
+ - Pair persistence with Auth v0.12.1 for explicit retry-safe refresh errors.
23
+
1
24
  ## 0.9.0
2
25
 
3
26
  - Add `credential: "auth" | "platform"` to app handles, extensions and frontend
package/README.md CHANGED
@@ -620,11 +620,9 @@ reconnect at token expiry and close on local logout. SDK stream reconnection is
620
620
  not server-side revocation: already-admitted work or a modified client may outlive
621
621
  token expiry unless the receiving app enforces its own lifetime.
622
622
 
623
- Sessions are kept **in memory**, not written to localStorage, sessionStorage or
624
- cookies. Reuse one client per application session. Reloads/new tabs require
625
- login and do not implicitly share a rotating refresh credential. Do not copy
626
- refresh tokens between clients/tabs. This release deliberately does not provide
627
- persistent/shared browser sessions.
623
+ Sessions default to **memory-only**. Reuse one client per application session.
624
+ Reloads/new tabs require login unless the host explicitly enables persistent
625
+ sessions as described below. Do not manage or copy refresh credentials yourself.
628
626
 
629
627
  `auth` mode cannot be combined with `apiKey`, `accessToken` or
630
628
  `refreshAccessToken`; `setApiKey` and `setAccessToken` are unavailable in this
@@ -640,7 +638,10 @@ rejected in app Auth mode. Without `auth` configuration, existing platform
640
638
  login and opaque-token APIs retain their original behavior.
641
639
 
642
640
  A temporary mint failure preserves the normal Auth session and blocks only
643
- platform-credential requests. Credential types never switch after an error. A rejected Auth refresh clears the session. Local logout clears
641
+ platform-credential requests. Credential types never switch after an error. An
642
+ explicit `refresh_unavailable` response keeps an active session and permits a
643
+ later refresh attempt; an `invalid_grant` response clears it. An uncertain
644
+ refresh outcome cannot safely reuse a single-use credential. Local logout clears
644
645
  credentials and streams immediately; a failed network logout still throws so the
645
646
  host can report that server-side revocation could not be confirmed. A late
646
647
  renewal cannot restore a logged-out session. HTTP writes are never automatically
@@ -659,3 +660,107 @@ local fixture servers. The platform mint API and protected Conversations gateway
659
660
  are simulated. It verifies routing, role downgrade, and server-side session
660
661
  revocation without accessing live accounts or carriers. Set `SDK_TEST_MODULE` to
661
662
  an unpacked package's `dist/index.js` to check the release artifact.
663
+
664
+
665
+ ## Optional persistent Auth sessions
666
+
667
+ Persistence is application-independent and opt-in. It uses the same managed Auth
668
+ session as HTTP, MCP, frontend loaders and streams; app credential selection does
669
+ not change. No customer-specific storage key, legacy session format or routing is
670
+ built into the SDK.
671
+
672
+ ```ts
673
+ const client = new AptevaClient({
674
+ baseURL,
675
+ projectId,
676
+ auth: {
677
+ clientId,
678
+ persistence: "local", // default: "memory"
679
+ onStateChange: state => renderSessionState(state),
680
+ onSessionChange: session => renderUser(session?.user),
681
+ },
682
+ });
683
+
684
+ try {
685
+ await client.auth.restore();
686
+ } catch {
687
+ // Show a retry action or login, according to client.auth.getState().
688
+ }
689
+
690
+ const crm = client.app("api", { credential: "auth" });
691
+ const conversations = client.app("conversations", { credential: "platform" });
692
+ ```
693
+
694
+ `auth.getState()` reports `status` (`idle`, `restoring`, `authenticated`,
695
+ `unauthenticated`, or `error`), effective `persistence` (`memory`, `local`, or
696
+ `unavailable`) and optional credential-free error metadata. Render loading for
697
+ `idle`/`restoring`, rather than briefly displaying the login screen. Concurrent
698
+ `restore()` calls share one promise. Protected requests await pending restoration
699
+ and can start initial restoration themselves. After a restoration error, retry
700
+ explicitly with `restore()` or log in; requests do not repeatedly retry it.
701
+ `onDiagnostic` receives credential-free refresh outcomes (`succeeded`,
702
+ `retryable`, `uncertain`, `invalid`) and session-clear reason codes. It never
703
+ receives tokens, server response text or user details. An already authenticated
704
+ tab stays authenticated after Auth explicitly returns `refresh_unavailable`;
705
+ the failed request rejects, and the next request can try refresh again.
706
+
707
+ Only the refresh credential, format version, configuration scope and locally
708
+ generated session/revision identifiers are persisted in localStorage. Normal Auth
709
+ and platform access tokens, user details and permissions stay in memory. The
710
+ `/refresh` response supplies the authoritative user and authorization context.
711
+ `getSession()`, `getState()`, callbacks and cross-tab notifications expose no
712
+ credentials. Browser storage is JavaScript-readable: enabling it deliberately
713
+ accepts the same-origin script/XSS exposure of a persisted refresh credential.
714
+
715
+ Storage and lock namespaces include the canonical server URL, project, Auth
716
+ installation (or automatic routing), organization, public client and profile.
717
+ Use consistent configuration across tabs that should share a session. Cross-tab
718
+ sharing is limited to the same browser origin and storage partition. Different
719
+ scopes do not import each other's credentials or identities.
720
+
721
+ Native Web Locks serialize login, restore, refresh and logout. Each refresh reads
722
+ the latest saved credential under the lock, writes an in-progress marker before
723
+ sending it, then saves the replacement before releasing the lock. Other tabs are
724
+ notified without broadcasting credentials. Switching accounts invalidates the
725
+ previous local session and closes its streams. Disposed clients release browser
726
+ listeners and local streams through `client.auth.dispose()` without revoking or
727
+ deleting the saved session.
728
+
729
+ If localStorage or Web Locks are unavailable, `persistence` reports `unavailable`
730
+ and a fresh login works in memory-only mode. There is no localStorage-based lock
731
+ fallback. If saving a rotated credential fails, the replacement remains in memory
732
+ and the durable in-progress marker prevents other tabs from reusing the old one.
733
+ A failure reading previously shared credentials requires a new login; the SDK
734
+ cannot safely promote a potentially stale in-memory refresh to an independent
735
+ session.
736
+
737
+ Logout clears local credentials and streams immediately. It then clears the
738
+ saved refresh credential under the shared lock, notifies other tabs, and asks
739
+ Auth to revoke the session. A failed network logout still rejects: local logout
740
+ does not guarantee server-side revocation while offline. Late refresh results
741
+ cannot replace a newer login or resurrect a completed logout.
742
+
743
+ Restoration failure handling:
744
+
745
+ | Result | SDK behavior |
746
+ | --- | --- |
747
+ | Auth rejects an invalid/revoked refresh with `401 invalid_grant` | Clear the saved and local session; login is required. |
748
+ | Browser is already offline before sending | Preserve the saved credential; retry restoration when connected. |
749
+ | Auth returns `refresh_unavailable` with 503 | Auth confirms rotation did not commit; preserve an active session and its credential for retry. |
750
+ | Network failure, generic proxy 5xx/401, malformed response, or `refresh_uncertain` | Preserve an uncertain marker; do not reuse the old credential. If no replacement was saved, require login. |
751
+ | Platform mint denied | Restore the Auth session; platform-protected access remains blocked. |
752
+ | Unsupported or malformed storage format | Fail closed; login or logout replaces the record. |
753
+
754
+ The explicit retry-safe and uncertain response codes require Auth v0.12.1
755
+ or newer. With older Auth versions, generic errors
756
+ are handled conservatively. A tab crash after server rotation but before saving
757
+ the response cannot be recovered transparently with single-use refresh tokens.
758
+
759
+ There is no automatic legacy-session migration. Existing customer storage is not
760
+ read or deleted; hosts should remove their old refresh loops and require one
761
+ login when adopting persistence. Any future import must be a separate explicit,
762
+ tested SDK API. HTTP writes are never replayed automatically after a 401.
763
+
764
+ Validate native browser behavior with `bunx playwright install chromium` followed
765
+ by `bun run test:persistence:browser`. These checks use isolated local fixtures,
766
+ real tabs, Web Locks and localStorage; they do not contact customer accounts.
@@ -1,3 +1,4 @@
1
+ import { type PersistenceEnvironment } from "./session-persistence.js";
1
2
  import type { AppCredential } from "./extensions.js";
2
3
  import type { User } from "./types.js";
3
4
  export interface AuthLoginInput {
@@ -25,6 +26,22 @@ export interface AuthSessionInfo {
25
26
  expiresAt: string;
26
27
  platformExpiresAt?: string;
27
28
  }
29
+ export interface AuthState {
30
+ status: "idle" | "restoring" | "authenticated" | "unauthenticated" | "error";
31
+ persistence: "memory" | "local" | "unavailable";
32
+ error?: {
33
+ code: string;
34
+ message: string;
35
+ };
36
+ }
37
+ /** Credential-free lifecycle events suitable for client telemetry. */
38
+ export type AuthDiagnostic = {
39
+ type: "refresh";
40
+ outcome: "succeeded" | "retryable" | "uncertain" | "invalid";
41
+ } | {
42
+ type: "session_clear";
43
+ reason: "login" | "logout" | "dispose" | "shared_change" | "invalid_refresh" | "refresh_uncertain" | "storage_error";
44
+ };
28
45
  export interface AppAuthOptions {
29
46
  /** Public Auth app OAuth client identifier; never a private client secret. */
30
47
  clientId: string;
@@ -32,8 +49,14 @@ export interface AppAuthOptions {
32
49
  organizationSlug?: string;
33
50
  /** Requested Auth policy profile. Auth independently checks current roles. */
34
51
  profile?: string;
35
- /** Receives user/session metadata, never credentials. Sessions are memory-only. */
52
+ /** Explicit opt-in. Local persistence requires browser storage and Web Locks. */
53
+ persistence?: "memory" | "local";
54
+ /** Restoration and persistence availability, without credentials. */
55
+ onStateChange?: (state: AuthState) => void;
56
+ /** Receives user/session metadata, never credentials. */
36
57
  onSessionChange?: (session: AuthSessionInfo | undefined) => void;
58
+ /** Receives fixed outcome and reason codes, never credentials or server text. */
59
+ onDiagnostic?: (event: AuthDiagnostic) => void;
37
60
  }
38
61
  export interface SessionCredential {
39
62
  token: string;
@@ -49,6 +72,11 @@ export declare class AuthSession {
49
72
  private readonly fetchImpl;
50
73
  private readonly changed;
51
74
  private state?;
75
+ private persistence?;
76
+ private stored?;
77
+ private restoration?;
78
+ private lifecycle;
79
+ private disposed;
52
80
  private epoch;
53
81
  private authRevision;
54
82
  private platformRevision;
@@ -56,22 +84,36 @@ export declare class AuthSession {
56
84
  private pendingAuth?;
57
85
  private controllers;
58
86
  private listeners;
59
- constructor(baseURL: string, projectId: string, options: AppAuthOptions, fetchImpl: typeof fetch, changed: (token: string | undefined) => void);
87
+ constructor(baseURL: string, projectId: string, options: AppAuthOptions, fetchImpl: typeof fetch, changed: (token: string | undefined) => void, environment?: PersistenceEnvironment);
88
+ getState(): AuthState;
89
+ private diagnostic;
90
+ private emitState;
91
+ private status;
92
+ private synchronize;
93
+ private ready;
94
+ restore(): Promise<AuthSessionInfo | undefined>;
95
+ private restoreSaved;
96
+ dispose(): void;
60
97
  info(): AuthSessionInfo | undefined;
61
98
  onClear(listener: () => void): () => void;
62
99
  private notify;
63
- clear(): void;
100
+ clear(reason?: Extract<AuthDiagnostic, {
101
+ type: "session_clear";
102
+ }>["reason"]): void;
64
103
  private assertEpoch;
65
104
  private call;
66
105
  private input;
67
106
  private platform;
107
+ private validateResponse;
68
108
  private accept;
109
+ private establish;
69
110
  login(input: AuthLoginInput): Promise<AuthUser>;
70
111
  register(input: AuthSignupInput): Promise<{
71
112
  user: AuthUser;
72
113
  verification_required?: boolean;
73
114
  }>;
74
115
  logout(): Promise<void>;
116
+ private refreshSaved;
75
117
  private refreshAuth;
76
118
  private performAuthRefresh;
77
119
  private renew;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-session.d.ts","sourceRoot":"","sources":["../src/auth-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,cAAc;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACnE,MAAM,WAAW,eAAgB,SAAQ,cAAc;IAAG,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;AAChF,MAAM,WAAW,QAAS,SAAQ,IAAI;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,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