@ikonai/sdk-react-ui 1.3.2 → 1.3.4

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.
@@ -26,11 +26,19 @@ export declare function hasPendingOAuthContinuation(): boolean;
26
26
  /**
27
27
  * Report the completed sign-in and hand the browser to the consent screen.
28
28
  *
29
+ * The token is passed in rather than read from storage. A signed-in browser does not necessarily have
30
+ * one there: a session backed by a refresh cookie is held in memory and its localStorage record is
31
+ * deliberately REMOVED, so reading storage returned null for a fully signed-in user and the handoff
32
+ * waited for a session that was never going to appear. The auth context holds the live token either
33
+ * way, so it is the only source that is right for both.
34
+ *
29
35
  * Only ever called after a REAL sign-in — `useAuthGuard` treats an anonymous session as not satisfying a
30
36
  * prompt, which is the guest/global exclusion this flow needs and already had. A `global` visitor is one
31
37
  * shared space-wide user, so authorizing as one would hand every client the same identity.
32
38
  *
33
- * Failure clears the pointer and returns false: the app then carries on as a normally signed-in session
34
- * rather than trapping the user in a flow that cannot finish.
39
+ * Returns whether the browser was handed on to consent. Failure is not one outcome but two, and they
40
+ * are treated differently: something a retry could fix (no readable session yet, a failed request)
41
+ * keeps the pointer so a later attempt can succeed, while a refusal from the server clears it, because
42
+ * retrying a spent or expired authorization only traps the user in a flow that cannot finish.
35
43
  */
36
- export declare function completeOAuthContinuation(): Promise<boolean>;
44
+ export declare function completeOAuthContinuation(token: string | null): Promise<boolean>;