gondi 0.60.0 → 0.60.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/dist/index.mjs +51 -51
- package/dist/index.mjs.map +3 -3
- package/dist/src/clients/api/auth.d.ts +11 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -7,11 +7,17 @@ export declare const signIn: ({ wallet, issuedAt }: {
|
|
|
7
7
|
issuedAt?: string;
|
|
8
8
|
}) => Promise<any>;
|
|
9
9
|
/**
|
|
10
|
-
* The wallet's API session: signs in on the first request and reuses the token
|
|
10
|
+
* The wallet's API session: signs in on the first request and reuses the token until it is about
|
|
11
|
+
* to expire, then signs in again.
|
|
11
12
|
*
|
|
12
|
-
* Requests that start before
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Requests that start before a sign-in finishes wait for that same sign-in rather than starting
|
|
14
|
+
* their own: every sign-in asks the API for a fresh nonce, which replaces the previous one, so
|
|
15
|
+
* concurrent sign-ins reject all but the last with `SIWE_ERROR`.
|
|
16
|
+
*
|
|
17
|
+
* The token's own `exp` decides when it is renewed. The API answers an expired token as if no
|
|
18
|
+
* token was sent, with an `UNAUTHORIZED` GraphQL error rather than an HTTP 401, and raises that
|
|
19
|
+
* same error for calls the wallet is not allowed to make, so re-signing on it would prompt the
|
|
20
|
+
* wallet on every forbidden call.
|
|
15
21
|
*/
|
|
16
22
|
export declare class SessionToken {
|
|
17
23
|
token?: string;
|
|
@@ -33,5 +39,6 @@ export declare class SessionToken {
|
|
|
33
39
|
context?: import("@apollo/client").DefaultContext;
|
|
34
40
|
extensions?: Record<string, any>;
|
|
35
41
|
}>;
|
|
42
|
+
private hasLiveToken;
|
|
36
43
|
private signIn;
|
|
37
44
|
}
|