@ic-reactor/react 3.13.0 → 4.0.0-beta.2

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.
Files changed (174) hide show
  1. package/README.md +237 -787
  2. package/dist/index.d.ts +260 -16
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +471 -23
  5. package/dist/index.js.map +1 -1
  6. package/llms.txt +82 -278
  7. package/package.json +11 -39
  8. package/src/index.tsx +612 -0
  9. package/dist/auth/auth-client-compat.d.ts +0 -122
  10. package/dist/auth/auth-client-compat.d.ts.map +0 -1
  11. package/dist/auth/auth-client-compat.js +0 -162
  12. package/dist/auth/auth-client-compat.js.map +0 -1
  13. package/dist/auth/authentication-manager.d.ts +0 -405
  14. package/dist/auth/authentication-manager.d.ts.map +0 -1
  15. package/dist/auth/authentication-manager.js +0 -1537
  16. package/dist/auth/authentication-manager.js.map +0 -1
  17. package/dist/auth/constants.d.ts +0 -24
  18. package/dist/auth/constants.d.ts.map +0 -1
  19. package/dist/auth/constants.js +0 -24
  20. package/dist/auth/constants.js.map +0 -1
  21. package/dist/auth/createIdentityAttributeHooks.d.ts +0 -14
  22. package/dist/auth/createIdentityAttributeHooks.d.ts.map +0 -1
  23. package/dist/auth/createIdentityAttributeHooks.js +0 -122
  24. package/dist/auth/createIdentityAttributeHooks.js.map +0 -1
  25. package/dist/auth/identity-attributes-manager.d.ts +0 -27
  26. package/dist/auth/identity-attributes-manager.d.ts.map +0 -1
  27. package/dist/auth/identity-attributes-manager.js +0 -191
  28. package/dist/auth/identity-attributes-manager.js.map +0 -1
  29. package/dist/auth/identity-attributes.d.ts +0 -19
  30. package/dist/auth/identity-attributes.d.ts.map +0 -1
  31. package/dist/auth/identity-attributes.js +0 -227
  32. package/dist/auth/identity-attributes.js.map +0 -1
  33. package/dist/auth/index.d.ts +0 -8
  34. package/dist/auth/index.d.ts.map +0 -1
  35. package/dist/auth/index.js +0 -8
  36. package/dist/auth/index.js.map +0 -1
  37. package/dist/auth/local-ii-probe.d.ts +0 -57
  38. package/dist/auth/local-ii-probe.d.ts.map +0 -1
  39. package/dist/auth/local-ii-probe.js +0 -121
  40. package/dist/auth/local-ii-probe.js.map +0 -1
  41. package/dist/auth/types.d.ts +0 -222
  42. package/dist/auth/types.d.ts.map +0 -1
  43. package/dist/auth/types.js +0 -2
  44. package/dist/auth/types.js.map +0 -1
  45. package/dist/createActorHooks.d.ts +0 -41
  46. package/dist/createActorHooks.d.ts.map +0 -1
  47. package/dist/createActorHooks.js +0 -17
  48. package/dist/createActorHooks.js.map +0 -1
  49. package/dist/createInfiniteQuery.d.ts +0 -185
  50. package/dist/createInfiniteQuery.d.ts.map +0 -1
  51. package/dist/createInfiniteQuery.js +0 -198
  52. package/dist/createInfiniteQuery.js.map +0 -1
  53. package/dist/createMutation.d.ts +0 -33
  54. package/dist/createMutation.d.ts.map +0 -1
  55. package/dist/createMutation.js +0 -199
  56. package/dist/createMutation.js.map +0 -1
  57. package/dist/createQuery.d.ts +0 -63
  58. package/dist/createQuery.d.ts.map +0 -1
  59. package/dist/createQuery.js +0 -204
  60. package/dist/createQuery.js.map +0 -1
  61. package/dist/createReactorProvider.d.ts +0 -158
  62. package/dist/createReactorProvider.d.ts.map +0 -1
  63. package/dist/createReactorProvider.js +0 -256
  64. package/dist/createReactorProvider.js.map +0 -1
  65. package/dist/createSuspenseInfiniteQuery.d.ts +0 -154
  66. package/dist/createSuspenseInfiniteQuery.d.ts.map +0 -1
  67. package/dist/createSuspenseInfiniteQuery.js +0 -209
  68. package/dist/createSuspenseInfiniteQuery.js.map +0 -1
  69. package/dist/createSuspenseQuery.d.ts +0 -46
  70. package/dist/createSuspenseQuery.d.ts.map +0 -1
  71. package/dist/createSuspenseQuery.js +0 -158
  72. package/dist/createSuspenseQuery.js.map +0 -1
  73. package/dist/defineDisplayReactor.d.ts +0 -43
  74. package/dist/defineDisplayReactor.d.ts.map +0 -1
  75. package/dist/defineDisplayReactor.js +0 -42
  76. package/dist/defineDisplayReactor.js.map +0 -1
  77. package/dist/defineReactor.d.ts +0 -99
  78. package/dist/defineReactor.d.ts.map +0 -1
  79. package/dist/defineReactor.js +0 -15
  80. package/dist/defineReactor.js.map +0 -1
  81. package/dist/defineReactorShared.d.ts +0 -84
  82. package/dist/defineReactorShared.d.ts.map +0 -1
  83. package/dist/defineReactorShared.js +0 -139
  84. package/dist/defineReactorShared.js.map +0 -1
  85. package/dist/hooks/createAuthHooks.d.ts +0 -50
  86. package/dist/hooks/createAuthHooks.d.ts.map +0 -1
  87. package/dist/hooks/createAuthHooks.js +0 -291
  88. package/dist/hooks/createAuthHooks.js.map +0 -1
  89. package/dist/hooks/index.d.ts +0 -21
  90. package/dist/hooks/index.d.ts.map +0 -1
  91. package/dist/hooks/index.js +0 -24
  92. package/dist/hooks/index.js.map +0 -1
  93. package/dist/hooks/useActorInfiniteQuery.d.ts +0 -67
  94. package/dist/hooks/useActorInfiniteQuery.d.ts.map +0 -1
  95. package/dist/hooks/useActorInfiniteQuery.js +0 -89
  96. package/dist/hooks/useActorInfiniteQuery.js.map +0 -1
  97. package/dist/hooks/useActorMethod.d.ts +0 -148
  98. package/dist/hooks/useActorMethod.d.ts.map +0 -1
  99. package/dist/hooks/useActorMethod.js +0 -394
  100. package/dist/hooks/useActorMethod.js.map +0 -1
  101. package/dist/hooks/useActorMutation.d.ts +0 -51
  102. package/dist/hooks/useActorMutation.d.ts.map +0 -1
  103. package/dist/hooks/useActorMutation.js +0 -70
  104. package/dist/hooks/useActorMutation.js.map +0 -1
  105. package/dist/hooks/useActorQuery.d.ts +0 -45
  106. package/dist/hooks/useActorQuery.d.ts.map +0 -1
  107. package/dist/hooks/useActorQuery.js +0 -67
  108. package/dist/hooks/useActorQuery.js.map +0 -1
  109. package/dist/hooks/useActorSuspenseInfiniteQuery.d.ts +0 -51
  110. package/dist/hooks/useActorSuspenseInfiniteQuery.d.ts.map +0 -1
  111. package/dist/hooks/useActorSuspenseInfiniteQuery.js +0 -76
  112. package/dist/hooks/useActorSuspenseInfiniteQuery.js.map +0 -1
  113. package/dist/hooks/useActorSuspenseQuery.d.ts +0 -32
  114. package/dist/hooks/useActorSuspenseQuery.d.ts.map +0 -1
  115. package/dist/hooks/useActorSuspenseQuery.js +0 -58
  116. package/dist/hooks/useActorSuspenseQuery.js.map +0 -1
  117. package/dist/ownedAuthentication.d.ts +0 -52
  118. package/dist/ownedAuthentication.d.ts.map +0 -1
  119. package/dist/ownedAuthentication.js +0 -49
  120. package/dist/ownedAuthentication.js.map +0 -1
  121. package/dist/server.d.ts +0 -21
  122. package/dist/server.d.ts.map +0 -1
  123. package/dist/server.js +0 -23
  124. package/dist/server.js.map +0 -1
  125. package/dist/testing.d.ts +0 -19
  126. package/dist/testing.d.ts.map +0 -1
  127. package/dist/testing.js +0 -19
  128. package/dist/testing.js.map +0 -1
  129. package/dist/types.d.ts +0 -671
  130. package/dist/types.d.ts.map +0 -1
  131. package/dist/types.js +0 -5
  132. package/dist/types.js.map +0 -1
  133. package/dist/utils.d.ts +0 -207
  134. package/dist/utils.d.ts.map +0 -1
  135. package/dist/utils.js +0 -405
  136. package/dist/utils.js.map +0 -1
  137. package/dist/validation.d.ts +0 -136
  138. package/dist/validation.d.ts.map +0 -1
  139. package/dist/validation.js +0 -144
  140. package/dist/validation.js.map +0 -1
  141. package/src/auth/auth-client-compat.ts +0 -273
  142. package/src/auth/authentication-manager.ts +0 -1682
  143. package/src/auth/constants.ts +0 -32
  144. package/src/auth/createIdentityAttributeHooks.ts +0 -169
  145. package/src/auth/identity-attributes-manager.ts +0 -226
  146. package/src/auth/identity-attributes.ts +0 -345
  147. package/src/auth/index.ts +0 -7
  148. package/src/auth/local-ii-probe.ts +0 -173
  149. package/src/auth/types.ts +0 -243
  150. package/src/createActorHooks.ts +0 -208
  151. package/src/createInfiniteQuery.ts +0 -670
  152. package/src/createMutation.ts +0 -324
  153. package/src/createQuery.ts +0 -369
  154. package/src/createReactorProvider.ts +0 -365
  155. package/src/createSuspenseInfiniteQuery.ts +0 -651
  156. package/src/createSuspenseQuery.ts +0 -304
  157. package/src/defineDisplayReactor.ts +0 -62
  158. package/src/defineReactor.ts +0 -142
  159. package/src/defineReactorShared.ts +0 -268
  160. package/src/hooks/createAuthHooks.ts +0 -371
  161. package/src/hooks/index.ts +0 -103
  162. package/src/hooks/useActorInfiniteQuery.ts +0 -278
  163. package/src/hooks/useActorMethod.ts +0 -710
  164. package/src/hooks/useActorMutation.ts +0 -205
  165. package/src/hooks/useActorQuery.ts +0 -157
  166. package/src/hooks/useActorSuspenseInfiniteQuery.ts +0 -248
  167. package/src/hooks/useActorSuspenseQuery.ts +0 -147
  168. package/src/index.ts +0 -31
  169. package/src/ownedAuthentication.ts +0 -81
  170. package/src/server.ts +0 -23
  171. package/src/testing.ts +0 -18
  172. package/src/types.ts +0 -948
  173. package/src/utils.ts +0 -505
  174. package/src/validation.ts +0 -226
@@ -1,227 +0,0 @@
1
- import { IDL } from "@icp-sdk/core/candid";
2
- import { IC_INTERNET_IDENTITY_PROVIDER } from "./constants.js";
3
- export const IDENTITY_ATTRIBUTES_PROVIDER = IC_INTERNET_IDENTITY_PROVIDER;
4
- /**
5
- * @deprecated Use the default ClientManager identity provider or
6
- * `IDENTITY_ATTRIBUTES_PROVIDER` instead.
7
- */
8
- export const IDENTITY_ATTRIBUTES_BETA_PROVIDER = IDENTITY_ATTRIBUTES_PROVIDER;
9
- const OPEN_ID_PROVIDER_URLS = {
10
- apple: "https://appleid.apple.com",
11
- google: "https://accounts.google.com",
12
- microsoft: "https://login.microsoftonline.com/{tid}/v2.0",
13
- };
14
- export function identityAttributeKeys({ openIdProvider, keys, }) {
15
- const provider = normalizeOpenIdProvider(openIdProvider);
16
- return keys.map((key) => `openid:${provider}:${key}`);
17
- }
18
- export function normalizeOpenIdProvider(openIdProvider) {
19
- return (OPEN_ID_PROVIDER_URLS[openIdProvider] ?? openIdProvider);
20
- }
21
- export async function resolveIdentityAttributeKeys({ openIdProvider, keys, }) {
22
- return identityAttributeKeys({ openIdProvider, keys });
23
- }
24
- export function decodeIdentityAttributeValues(data, requestedKeys) {
25
- const requestedKeyMap = requestedKeys.reduce((acc, key) => {
26
- acc[key] = identityAttributeDisplayKey(key);
27
- acc[identityAttributeDisplayKey(key)] = identityAttributeDisplayKey(key);
28
- return acc;
29
- }, {});
30
- // Internet Identity's own format, read by its type. Once a message is known
31
- // to be one, a key it does not hold is absent: the text fallback below
32
- // cannot add anything true, only a neighbouring value under the wrong name.
33
- const icrc3Entries = decodeIcrc3AttributeMap(data);
34
- if (icrc3Entries) {
35
- return collectIcrc3TextValues(icrc3Entries, requestedKeyMap);
36
- }
37
- const decodedValues = decodeCandidAttributeValues(data, requestedKeyMap);
38
- if (Object.keys(decodedValues).length > 0) {
39
- return decodedValues;
40
- }
41
- return extractPrintableAttributeValues(data, requestedKeys);
42
- }
43
- /**
44
- * The entries of an Internet Identity attribute message, or `undefined` when
45
- * `data` is not one.
46
- *
47
- * The canister certifies `Encode!(&Icrc3Value::Map(..))`: the requested
48
- * attributes under the keys they were requested by (bare, such as `email`, for
49
- * an unscoped request), plus `implicit:nonce`, `implicit:origin` and
50
- * `implicit:issued_at_timestamp_ns`. None of the shapes
51
- * {@link decodeCandidAttributeValues} tries match it, so without this every
52
- * real response was read by scraping printable text, which returned the
53
- * neighbouring length byte as part of a value, cut names at the first
54
- * non-ASCII character, and matched keys inside other values.
55
- *
56
- * @see https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-3/README.md
57
- */
58
- function decodeIcrc3AttributeMap(data) {
59
- const value = IDL.Rec();
60
- value.fill(IDL.Variant({
61
- Nat: IDL.Nat,
62
- Int: IDL.Int,
63
- Blob: IDL.Vec(IDL.Nat8),
64
- Text: IDL.Text,
65
- Array: IDL.Vec(value),
66
- Map: IDL.Vec(IDL.Tuple(IDL.Text, value)),
67
- }));
68
- try {
69
- const [decoded] = IDL.decode([value], data);
70
- return "Map" in decoded ? decoded.Map : undefined;
71
- }
72
- catch {
73
- return undefined;
74
- }
75
- }
76
- /**
77
- * The requested attributes in an ICRC-3 map, as certified.
78
- *
79
- * Only `Text` entries are attribute values; the `implicit:` entries are there
80
- * for the verifier and are returned only if asked for by name.
81
- */
82
- function collectIcrc3TextValues(entries, requestedKeyMap) {
83
- const values = {};
84
- for (const [key, value] of entries) {
85
- if (!Object.prototype.hasOwnProperty.call(requestedKeyMap, key))
86
- continue;
87
- if ("Text" in value) {
88
- values[requestedKeyMap[key]] = value.Text;
89
- }
90
- }
91
- return values;
92
- }
93
- function decodeCandidAttributeValues(data, requestedKeyMap) {
94
- const textPairs = IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text));
95
- const recordPairs = IDL.Vec(IDL.Record({
96
- key: IDL.Text,
97
- value: IDL.Text,
98
- }));
99
- const candidates = [
100
- [textPairs],
101
- [recordPairs],
102
- [IDL.Record({ attributes: textPairs })],
103
- [IDL.Record({ values: textPairs })],
104
- [IDL.Record({ attributes: recordPairs })],
105
- [IDL.Record({ values: recordPairs })],
106
- ];
107
- for (const candidate of candidates) {
108
- try {
109
- const decoded = IDL.decode(candidate, data);
110
- const values = collectDecodedAttributeValues(decoded, requestedKeyMap);
111
- if (Object.keys(values).length > 0) {
112
- return values;
113
- }
114
- }
115
- catch {
116
- // Try the next known beta payload shape, then fall back to text extraction.
117
- }
118
- }
119
- return {};
120
- }
121
- function collectDecodedAttributeValues(value, requestedKeyMap, activeKey) {
122
- const values = {};
123
- if (typeof value === "string") {
124
- const displayKey = requestedKeyMap[value];
125
- if (displayKey) {
126
- return values;
127
- }
128
- if (activeKey && isPrintableTextValue(value)) {
129
- values[activeKey] = value;
130
- }
131
- return values;
132
- }
133
- if (Array.isArray(value)) {
134
- if (value.length === 2 && typeof value[0] === "string") {
135
- const displayKey = requestedKeyMap[value[0]];
136
- if (displayKey &&
137
- typeof value[1] === "string" &&
138
- isPrintableTextValue(value[1])) {
139
- values[displayKey] = value[1];
140
- return values;
141
- }
142
- }
143
- for (const item of value) {
144
- Object.assign(values, collectDecodedAttributeValues(item, requestedKeyMap, activeKey));
145
- }
146
- return values;
147
- }
148
- if (value && typeof value === "object") {
149
- const record = value;
150
- if (typeof record.key === "string" && typeof record.value === "string") {
151
- const displayKey = requestedKeyMap[record.key];
152
- if (displayKey && isPrintableTextValue(record.value)) {
153
- values[displayKey] = record.value;
154
- return values;
155
- }
156
- }
157
- for (const [key, nested] of Object.entries(record)) {
158
- const displayKey = requestedKeyMap[key] ?? activeKey;
159
- if (displayKey &&
160
- typeof nested === "string" &&
161
- isPrintableTextValue(nested)) {
162
- values[displayKey] = nested;
163
- continue;
164
- }
165
- Object.assign(values, collectDecodedAttributeValues(nested, requestedKeyMap, displayKey));
166
- }
167
- }
168
- return values;
169
- }
170
- function extractPrintableAttributeValues(data, requestedKeys) {
171
- const text = new TextDecoder().decode(data);
172
- const values = {};
173
- for (const requestedKey of requestedKeys) {
174
- const start = text.indexOf(requestedKey);
175
- if (start === -1) {
176
- continue;
177
- }
178
- const tail = text.slice(start + requestedKey.length);
179
- const printableRuns = tail.match(/[\x20-\x7E]{2,512}/g) ?? [];
180
- const value = printableRuns
181
- .map((candidate) => cleanPrintableAttributeValue(candidate, requestedKeys))
182
- .find((candidate) => isPrintableTextValue(candidate) &&
183
- candidate !== requestedKey &&
184
- !candidate.startsWith("openid:"));
185
- if (value) {
186
- values[identityAttributeDisplayKey(requestedKey)] = value.trim();
187
- }
188
- }
189
- return values;
190
- }
191
- function cleanPrintableAttributeValue(value, requestedKeys) {
192
- let cleaned = value;
193
- for (const requestedKey of requestedKeys) {
194
- const nextKeyIndex = cleaned.indexOf(requestedKey);
195
- if (nextKeyIndex > 0) {
196
- cleaned = cleaned.slice(0, trimCandidTextLengthPrefix(cleaned, nextKeyIndex));
197
- }
198
- }
199
- const nextOpenIdKeyIndex = cleaned.indexOf("openid:");
200
- if (nextOpenIdKeyIndex > 0) {
201
- cleaned = cleaned.slice(0, trimCandidTextLengthPrefix(cleaned, nextOpenIdKeyIndex));
202
- }
203
- return cleaned.trim();
204
- }
205
- function trimCandidTextLengthPrefix(value, index) {
206
- let trimmedIndex = index;
207
- while (trimmedIndex > 0 && isAsciiDigit(value.charCodeAt(trimmedIndex - 1))) {
208
- trimmedIndex -= 1;
209
- }
210
- return trimmedIndex;
211
- }
212
- function isAsciiDigit(charCode) {
213
- return charCode >= 48 && charCode <= 57;
214
- }
215
- function identityAttributeDisplayKey(key) {
216
- return key.split(":").pop() || key;
217
- }
218
- function isPrintableTextValue(value) {
219
- return value.length > 0 && value.length <= 512 && /^[\x20-\x7E]+$/.test(value);
220
- }
221
- export function normalizeSignedIdentityAttributes(attributes) {
222
- return {
223
- data: new Uint8Array(attributes.data),
224
- signature: new Uint8Array(attributes.signature),
225
- };
226
- }
227
- //# sourceMappingURL=identity-attributes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity-attributes.js","sourceRoot":"","sources":["../../src/auth/identity-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAO1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAE9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,6BAA6B,CAAA;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,4BAA4B,CAAA;AAE7E,MAAM,qBAAqB,GAAG;IAC5B,KAAK,EAAE,2BAA2B;IAClC,MAAM,EAAE,6BAA6B;IACrC,SAAS,EAAE,8CAA8C;CACjD,CAAA;AAEV,MAAM,UAAU,qBAAqB,CAAC,EACpC,cAAc,EACd,IAAI,GAIL;IACC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,cAAc,CAAC,CAAA;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAA;AACvD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,cAA+C;IAE/C,OAAO,CACL,qBAAqB,CACnB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,CAAC;AAED,SAAS,YAAY,CAAC,QAAgB;IACpC,OAAO,QAAQ,IAAI,EAAE,IAAI,QAAQ,IAAI,EAAE,CAAA;AACzC,CAAC;AAED,SAAS,2BAA2B,CAAC,GAAW;IAC9C,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAA;AACpC,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa;IACzC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAChF,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,UAAoC;IAEpC,OAAO;QACL,IAAI,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC;QACrC,SAAS,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC;KAChD,CAAA;AACH,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from "./authentication-manager.js";
2
- export * from "./identity-attributes-manager.js";
3
- export * from "./identity-attributes.js";
4
- export * from "./constants.js";
5
- export * from "./types.js";
6
- export * from "../hooks/createAuthHooks.js";
7
- export * from "./createIdentityAttributeHooks.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA"}
@@ -1,8 +0,0 @@
1
- export * from "./authentication-manager.js";
2
- export * from "./identity-attributes-manager.js";
3
- export * from "./identity-attributes.js";
4
- export * from "./constants.js";
5
- export * from "./types.js";
6
- export * from "../hooks/createAuthHooks.js";
7
- export * from "./createIdentityAttributeHooks.js";
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA"}
@@ -1,57 +0,0 @@
1
- /**
2
- * Ask a locally deployed Internet Identity canister what it actually serves.
3
- *
4
- * `localInternetIdentityProvider` builds `http://<id>.localhost:<port>/authorize`,
5
- * the id.ai-era path. Whether that works depends on which Internet Identity
6
- * build is installed, and the window is narrow:
7
- *
8
- * - up to `release-2025-03-07`, the SPA lived at `/` and used a `#authorize`
9
- * fragment; `/authorize` is not an asset
10
- * - `release-2026-01-05` through `release-2026-03-16` serve `/authorize`
11
- * - from `release-2026-03-23` the frontend left the canister entirely (the id.ai
12
- * split), so `/authorize` 404s even on `.raw`
13
- *
14
- * Outside that window the login popup renders the gateway's
15
- * "Response Verification Error" page and the app simply waits until the user
16
- * closes it. Nothing points at the cause.
17
- *
18
- * Asking the canister over the agent avoids the gateway, so the answer is about
19
- * the canister's assets rather than about how the gateway felt about them.
20
- */
21
- import { type HttpAgent } from "@icp-sdk/core/agent";
22
- import type { AuthClientFlavor } from "./auth-client-compat.js";
23
- /** Where a given Internet Identity build expects the sign-in flow to start. */
24
- export type AuthorizePath = "/authorize" | "/#authorize";
25
- export interface LocalIiProbe {
26
- /** The path that works, or `null` when the canister serves no sign-in UI. */
27
- path: AuthorizePath | null;
28
- /**
29
- * The probe could not reach a conclusion — the canister was unreachable, or
30
- * it does not expose `http_request` at all. Callers keep their existing
31
- * behaviour rather than blocking a login that might well work.
32
- */
33
- inconclusive: boolean;
34
- }
35
- /**
36
- * Determine which authorize path a locally deployed Internet Identity serves.
37
- *
38
- * Never throws. A probe that cannot answer returns `inconclusive`, because a
39
- * diagnostic that blocks a working setup is worse than the failure it explains.
40
- */
41
- export declare function probeLocalInternetIdentity(agent: HttpAgent, canisterId: string): Promise<LocalIiProbe>;
42
- /**
43
- * The error a login gets when the installed build serves no sign-in UI, in
44
- * place of a 503 page inside a popup the app cannot see.
45
- *
46
- * The fix depends on the installed `@icp-sdk/auth` major. v8 signs in through
47
- * the page the canister serves, so an older build that still serves one works.
48
- * v10 signs in through `ii_session_delegation` and mints with
49
- * `app_prepare_delegation`, which Internet Identity gained only after its
50
- * frontend left the canister (#561). No build serves both, so a v10 app needs
51
- * the frontend from somewhere else, and older builds cannot help it.
52
- *
53
- * @param flavor - The installed client's contract. Defaults to `legacy` (v8),
54
- * whose advice this error gave before it knew about v10.
55
- */
56
- export declare function localInternetIdentityUnavailableError(canisterId: string, flavor?: AuthClientFlavor): Error;
57
- //# sourceMappingURL=local-ii-probe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-ii-probe.d.ts","sourceRoot":"","sources":["../../src/auth/local-ii-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAoC/D,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,aAAa,CAAA;AAExD,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,aAAa,GAAG,IAAI,CAAA;IAC1B;;;;OAIG;IACH,YAAY,EAAE,OAAO,CAAA;CACtB;AAmBD;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,CA+BvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,gBAA2B,GAClC,KAAK,CAuBP"}
@@ -1,121 +0,0 @@
1
- /**
2
- * Ask a locally deployed Internet Identity canister what it actually serves.
3
- *
4
- * `localInternetIdentityProvider` builds `http://<id>.localhost:<port>/authorize`,
5
- * the id.ai-era path. Whether that works depends on which Internet Identity
6
- * build is installed, and the window is narrow:
7
- *
8
- * - up to `release-2025-03-07`, the SPA lived at `/` and used a `#authorize`
9
- * fragment; `/authorize` is not an asset
10
- * - `release-2026-01-05` through `release-2026-03-16` serve `/authorize`
11
- * - from `release-2026-03-23` the frontend left the canister entirely (the id.ai
12
- * split), so `/authorize` 404s even on `.raw`
13
- *
14
- * Outside that window the login popup renders the gateway's
15
- * "Response Verification Error" page and the app simply waits until the user
16
- * closes it. Nothing points at the cause.
17
- *
18
- * Asking the canister over the agent avoids the gateway, so the answer is about
19
- * the canister's assets rather than about how the gateway felt about them.
20
- */
21
- import { Actor } from "@icp-sdk/core/agent";
22
- /** The `http_request` query every asset-serving canister exposes. */
23
- const httpInterface = ({ IDL }) => {
24
- const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
25
- return IDL.Service({
26
- http_request: IDL.Func([
27
- IDL.Record({
28
- method: IDL.Text,
29
- url: IDL.Text,
30
- headers: IDL.Vec(HeaderField),
31
- body: IDL.Vec(IDL.Nat8),
32
- }),
33
- ], [
34
- IDL.Record({
35
- status_code: IDL.Nat16,
36
- headers: IDL.Vec(HeaderField),
37
- body: IDL.Vec(IDL.Nat8),
38
- }),
39
- ], ["query"]),
40
- });
41
- };
42
- async function statusOf(actor, url) {
43
- try {
44
- const response = await actor.http_request({
45
- method: "GET",
46
- url,
47
- headers: [],
48
- body: new Uint8Array(),
49
- });
50
- return response.status_code;
51
- }
52
- catch {
53
- return undefined;
54
- }
55
- }
56
- /**
57
- * Determine which authorize path a locally deployed Internet Identity serves.
58
- *
59
- * Never throws. A probe that cannot answer returns `inconclusive`, because a
60
- * diagnostic that blocks a working setup is worse than the failure it explains.
61
- */
62
- export async function probeLocalInternetIdentity(agent, canisterId) {
63
- let actor;
64
- try {
65
- actor = Actor.createActor(httpInterface, {
66
- agent,
67
- canisterId,
68
- });
69
- }
70
- catch {
71
- return { path: "/authorize", inconclusive: true };
72
- }
73
- const authorize = await statusOf(actor, "/authorize");
74
- // The canister does not answer http_request at all — not an asset canister,
75
- // not deployed, or the replica is down. Not our call to make.
76
- if (authorize === undefined) {
77
- return { path: "/authorize", inconclusive: true };
78
- }
79
- if (authorize >= 200 && authorize < 300) {
80
- return { path: "/authorize", inconclusive: false };
81
- }
82
- // Pre-2026 builds serve the SPA at the root and drive the flow from a
83
- // `#authorize` fragment, which is a path the gateway never sees.
84
- const root = await statusOf(actor, "/");
85
- if (root !== undefined && root >= 200 && root < 300) {
86
- return { path: "/#authorize", inconclusive: false };
87
- }
88
- return { path: null, inconclusive: false };
89
- }
90
- /**
91
- * The error a login gets when the installed build serves no sign-in UI, in
92
- * place of a 503 page inside a popup the app cannot see.
93
- *
94
- * The fix depends on the installed `@icp-sdk/auth` major. v8 signs in through
95
- * the page the canister serves, so an older build that still serves one works.
96
- * v10 signs in through `ii_session_delegation` and mints with
97
- * `app_prepare_delegation`, which Internet Identity gained only after its
98
- * frontend left the canister (#561). No build serves both, so a v10 app needs
99
- * the frontend from somewhere else, and older builds cannot help it.
100
- *
101
- * @param flavor - The installed client's contract. Defaults to `legacy` (v8),
102
- * whose advice this error gave before it knew about v10.
103
- */
104
- export function localInternetIdentityUnavailableError(canisterId, flavor = "legacy") {
105
- const problem = `[ic-reactor] The Internet Identity canister ${canisterId} does not serve a sign-in UI: ` +
106
- `neither /authorize nor / returned a page. `;
107
- if (flavor === "session") {
108
- return new Error(problem +
109
- `With @icp-sdk/auth v10, local sign-in needs an Internet Identity frontend served ` +
110
- `separately, because no Internet Identity canister build both serves /authorize and ` +
111
- `supports v10 sessions. Set \`identityProvider\` to that frontend's authorize URL and ` +
112
- `\`internetIdentityId\` to the local Internet Identity canister that mints its delegations.`);
113
- }
114
- return new Error(problem +
115
- `Internet Identity builds from ` +
116
- `release-2026-03-23 onward moved their frontend out of the canister (the id.ai split) ` +
117
- `and cannot be used locally. Install internet_identity_dev.wasm from release-2026-03-16, ` +
118
- `the newest build that still self-serves /authorize, or point \`identityProvider\` at a ` +
119
- `provider you host yourself.`);
120
- }
121
- //# sourceMappingURL=local-ii-probe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-ii-probe.js","sourceRoot":"","sources":["../../src/auth/local-ii-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAkB,MAAM,qBAAqB,CAAA;AAI3D,qEAAqE;AACrE,MAAM,aAAa,GAAyB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IACtD,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IACjD,OAAO,GAAG,CAAC,OAAO,CAAC;QACjB,YAAY,EAAE,GAAG,CAAC,IAAI,CACpB;YACE,GAAG,CAAC,MAAM,CAAC;gBACT,MAAM,EAAE,GAAG,CAAC,IAAI;gBAChB,GAAG,EAAE,GAAG,CAAC,IAAI;gBACb,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;gBAC7B,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;aACxB,CAAC;SACH,EACD;YACE,GAAG,CAAC,MAAM,CAAC;gBACT,WAAW,EAAE,GAAG,CAAC,KAAK;gBACtB,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;gBAC7B,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;aACxB,CAAC;SACH,EACD,CAAC,OAAO,CAAC,CACV;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAyBD,KAAK,UAAU,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