@alore/auth-react-ui 1.0.0-alpha

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 (144) hide show
  1. package/LICENSE +504 -0
  2. package/dist/cjs/Auth.d.ts +18 -0
  3. package/dist/cjs/Auth.js +74 -0
  4. package/dist/cjs/Auth.js.map +1 -0
  5. package/dist/cjs/auth/Login.d.ts +15 -0
  6. package/dist/cjs/auth/Login.js +714 -0
  7. package/dist/cjs/auth/Login.js.map +1 -0
  8. package/dist/cjs/auth/Register.d.ts +16 -0
  9. package/dist/cjs/auth/Register.js +633 -0
  10. package/dist/cjs/auth/Register.js.map +1 -0
  11. package/dist/cjs/components/AuthProvider.d.ts +473 -0
  12. package/dist/cjs/components/AuthProvider.js +36 -0
  13. package/dist/cjs/components/AuthProvider.js.map +1 -0
  14. package/dist/cjs/components/BackButton.d.ts +9 -0
  15. package/dist/cjs/components/BackButton.js +28 -0
  16. package/dist/cjs/components/BackButton.js.map +1 -0
  17. package/dist/cjs/components/CheckboxForm.d.ts +12 -0
  18. package/dist/cjs/components/CheckboxForm.js +29 -0
  19. package/dist/cjs/components/CheckboxForm.js.map +1 -0
  20. package/dist/cjs/components/FormRules/helpers/index.d.ts +13 -0
  21. package/dist/cjs/components/FormRules/helpers/index.js +52 -0
  22. package/dist/cjs/components/FormRules/helpers/index.js.map +1 -0
  23. package/dist/cjs/components/FormRules/index.d.ts +11 -0
  24. package/dist/cjs/components/FormRules/index.js +19 -0
  25. package/dist/cjs/components/FormRules/index.js.map +1 -0
  26. package/dist/cjs/components/InputErrorHelperText.d.ts +7 -0
  27. package/dist/cjs/components/InputErrorHelperText.js +10 -0
  28. package/dist/cjs/components/InputErrorHelperText.js.map +1 -0
  29. package/dist/cjs/components/InputForm.d.ts +14 -0
  30. package/dist/cjs/components/InputForm.js +80 -0
  31. package/dist/cjs/components/InputForm.js.map +1 -0
  32. package/dist/cjs/components/InputOTP.d.ts +12 -0
  33. package/dist/cjs/components/InputOTP.js +118 -0
  34. package/dist/cjs/components/InputOTP.js.map +1 -0
  35. package/dist/cjs/components/TermsModal.d.ts +10 -0
  36. package/dist/cjs/components/TermsModal.js +27 -0
  37. package/dist/cjs/components/TermsModal.js.map +1 -0
  38. package/dist/cjs/components/index.d.ts +6 -0
  39. package/dist/cjs/components/index.js +19 -0
  40. package/dist/cjs/components/index.js.map +1 -0
  41. package/dist/cjs/dictionaries/en.json +116 -0
  42. package/dist/cjs/dictionaries/pt.json +116 -0
  43. package/dist/cjs/get-dictionary.d.ts +356 -0
  44. package/dist/cjs/get-dictionary.js +46 -0
  45. package/dist/cjs/get-dictionary.js.map +1 -0
  46. package/dist/cjs/helpers/index.d.ts +8 -0
  47. package/dist/cjs/helpers/index.js +27 -0
  48. package/dist/cjs/helpers/index.js.map +1 -0
  49. package/dist/cjs/hooks/useAuthService.d.ts +1400 -0
  50. package/dist/cjs/hooks/useAuthService.js +15 -0
  51. package/dist/cjs/hooks/useAuthService.js.map +1 -0
  52. package/dist/cjs/hooks/useAuthServiceInstance.d.ts +469 -0
  53. package/dist/cjs/hooks/useAuthServiceInstance.js +13 -0
  54. package/dist/cjs/hooks/useAuthServiceInstance.js.map +1 -0
  55. package/dist/cjs/hooks/useDictionary.d.ts +118 -0
  56. package/dist/cjs/hooks/useDictionary.js +15 -0
  57. package/dist/cjs/hooks/useDictionary.js.map +1 -0
  58. package/dist/cjs/index.d.ts +7 -0
  59. package/dist/cjs/index.js +13 -0
  60. package/dist/cjs/index.js.map +1 -0
  61. package/dist/cjs/machine/index.d.ts +937 -0
  62. package/dist/cjs/machine/index.js +1208 -0
  63. package/dist/cjs/machine/index.js.map +1 -0
  64. package/dist/cjs/machine/index.typegen.d.ts +164 -0
  65. package/dist/cjs/machine/index.typegen.js +4 -0
  66. package/dist/cjs/machine/index.typegen.js.map +1 -0
  67. package/dist/cjs/machine/types.d.ts +324 -0
  68. package/dist/cjs/machine/types.js +3 -0
  69. package/dist/cjs/machine/types.js.map +1 -0
  70. package/dist/cjs/utils/index.d.ts +7 -0
  71. package/dist/cjs/utils/index.js +19 -0
  72. package/dist/cjs/utils/index.js.map +1 -0
  73. package/dist/mjs/Auth.d.ts +18 -0
  74. package/dist/mjs/Auth.js +46 -0
  75. package/dist/mjs/Auth.js.map +1 -0
  76. package/dist/mjs/auth/Login.d.ts +15 -0
  77. package/dist/mjs/auth/Login.js +688 -0
  78. package/dist/mjs/auth/Login.js.map +1 -0
  79. package/dist/mjs/auth/Register.d.ts +16 -0
  80. package/dist/mjs/auth/Register.js +603 -0
  81. package/dist/mjs/auth/Register.js.map +1 -0
  82. package/dist/mjs/components/AuthProvider.d.ts +473 -0
  83. package/dist/mjs/components/AuthProvider.js +9 -0
  84. package/dist/mjs/components/AuthProvider.js.map +1 -0
  85. package/dist/mjs/components/BackButton.d.ts +9 -0
  86. package/dist/mjs/components/BackButton.js +9 -0
  87. package/dist/mjs/components/BackButton.js.map +1 -0
  88. package/dist/mjs/components/CheckboxForm.d.ts +12 -0
  89. package/dist/mjs/components/CheckboxForm.js +10 -0
  90. package/dist/mjs/components/CheckboxForm.js.map +1 -0
  91. package/dist/mjs/components/FormRules/helpers/index.d.ts +13 -0
  92. package/dist/mjs/components/FormRules/helpers/index.js +48 -0
  93. package/dist/mjs/components/FormRules/helpers/index.js.map +1 -0
  94. package/dist/mjs/components/FormRules/index.d.ts +11 -0
  95. package/dist/mjs/components/FormRules/index.js +14 -0
  96. package/dist/mjs/components/FormRules/index.js.map +1 -0
  97. package/dist/mjs/components/InputErrorHelperText.d.ts +7 -0
  98. package/dist/mjs/components/InputErrorHelperText.js +5 -0
  99. package/dist/mjs/components/InputErrorHelperText.js.map +1 -0
  100. package/dist/mjs/components/InputForm.d.ts +14 -0
  101. package/dist/mjs/components/InputForm.js +58 -0
  102. package/dist/mjs/components/InputForm.js.map +1 -0
  103. package/dist/mjs/components/InputOTP.d.ts +12 -0
  104. package/dist/mjs/components/InputOTP.js +93 -0
  105. package/dist/mjs/components/InputOTP.js.map +1 -0
  106. package/dist/mjs/components/TermsModal.d.ts +10 -0
  107. package/dist/mjs/components/TermsModal.js +21 -0
  108. package/dist/mjs/components/TermsModal.js.map +1 -0
  109. package/dist/mjs/components/index.d.ts +6 -0
  110. package/dist/mjs/components/index.js +7 -0
  111. package/dist/mjs/components/index.js.map +1 -0
  112. package/dist/mjs/dictionaries/en.json +116 -0
  113. package/dist/mjs/dictionaries/pt.json +116 -0
  114. package/dist/mjs/get-dictionary.d.ts +356 -0
  115. package/dist/mjs/get-dictionary.js +10 -0
  116. package/dist/mjs/get-dictionary.js.map +1 -0
  117. package/dist/mjs/helpers/index.d.ts +8 -0
  118. package/dist/mjs/helpers/index.js +23 -0
  119. package/dist/mjs/helpers/index.js.map +1 -0
  120. package/dist/mjs/hooks/useAuthService.d.ts +1400 -0
  121. package/dist/mjs/hooks/useAuthService.js +13 -0
  122. package/dist/mjs/hooks/useAuthService.js.map +1 -0
  123. package/dist/mjs/hooks/useAuthServiceInstance.d.ts +469 -0
  124. package/dist/mjs/hooks/useAuthServiceInstance.js +11 -0
  125. package/dist/mjs/hooks/useAuthServiceInstance.js.map +1 -0
  126. package/dist/mjs/hooks/useDictionary.d.ts +118 -0
  127. package/dist/mjs/hooks/useDictionary.js +13 -0
  128. package/dist/mjs/hooks/useDictionary.js.map +1 -0
  129. package/dist/mjs/index.d.ts +7 -0
  130. package/dist/mjs/index.js +6 -0
  131. package/dist/mjs/index.js.map +1 -0
  132. package/dist/mjs/machine/index.d.ts +937 -0
  133. package/dist/mjs/machine/index.js +1189 -0
  134. package/dist/mjs/machine/index.js.map +1 -0
  135. package/dist/mjs/machine/index.typegen.d.ts +164 -0
  136. package/dist/mjs/machine/index.typegen.js +3 -0
  137. package/dist/mjs/machine/index.typegen.js.map +1 -0
  138. package/dist/mjs/machine/types.d.ts +324 -0
  139. package/dist/mjs/machine/types.js +2 -0
  140. package/dist/mjs/machine/types.js.map +1 -0
  141. package/dist/mjs/utils/index.d.ts +7 -0
  142. package/dist/mjs/utils/index.js +16 -0
  143. package/dist/mjs/utils/index.js.map +1 -0
  144. package/package.json +46 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("@xstate/react");
4
+ const react_2 = require("react");
5
+ const AuthProvider_1 = require("../components/AuthProvider");
6
+ const useAuthService = () => {
7
+ const authServiceInstance = (0, react_2.useContext)(AuthProvider_1.AuthContext);
8
+ if (!authServiceInstance) {
9
+ throw new Error('useAuthService must be used within an AuthProvider');
10
+ }
11
+ const [authState, sendAuth] = (0, react_1.useActor)(authServiceInstance);
12
+ return [authState, sendAuth];
13
+ };
14
+ exports.default = useAuthService;
15
+ //# sourceMappingURL=useAuthService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAuthService.js","sourceRoot":"","sources":["../../../src/hooks/useAuthService.tsx"],"names":[],"mappings":";;AAAA,yCAAyC;AACzC,iCAAmC;AAEnC,6DAAyD;AAEzD,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,mBAAmB,GAAG,IAAA,kBAAU,EAAC,0BAAW,CAAC,CAAC;IACpD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,mBAAmB,CAAC,CAAC;IAE5D,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AACxC,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,469 @@
1
+ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import("../machine/types").AuthMachineContext, any, {
2
+ type: "INITIALIZE";
3
+ forgeId?: string | null | undefined;
4
+ } | {
5
+ type: "RESET";
6
+ } | {
7
+ type: "RESET_CONTEXT";
8
+ } | {
9
+ type: "REFRESH_ACCESS_TOKEN";
10
+ newAccessToken: string;
11
+ } | {
12
+ type: "ADVANCE_TO_PASSWORD";
13
+ } | {
14
+ type: "BACK";
15
+ } | {
16
+ type: "BACK_TO_IDLE";
17
+ } | {
18
+ type: "SELECT_CONNECTOR";
19
+ } | {
20
+ type: "NEXT";
21
+ payload: {
22
+ email: string;
23
+ };
24
+ } | {
25
+ type: "GOOGLE_LOGIN";
26
+ googleToken: string;
27
+ } | {
28
+ type: "START_PASSKEY_LOGIN";
29
+ payload: {
30
+ email: string;
31
+ };
32
+ } | {
33
+ type: "SELECT_PASSWORD";
34
+ payload: {
35
+ email: string;
36
+ };
37
+ } | {
38
+ type: "START_PASSKEY_REGISTER";
39
+ payload: {
40
+ device: string;
41
+ email: string;
42
+ nickname?: string | undefined;
43
+ };
44
+ } | {
45
+ type: "FINISH_PASSKEY_LOGIN";
46
+ payload: {
47
+ passkeyAuth: {
48
+ id: string;
49
+ rawId: string;
50
+ response: {
51
+ authenticatorData: string;
52
+ clientDataJSON: string;
53
+ signature: string;
54
+ userHandle?: string | undefined;
55
+ };
56
+ type: string;
57
+ };
58
+ };
59
+ } | {
60
+ type: "FINISH_PASSKEY_AUTH";
61
+ payload: {
62
+ passkeyAuth: {
63
+ id: string;
64
+ rawId: string;
65
+ response: {
66
+ authenticatorData: string;
67
+ clientDataJSON: string;
68
+ signature: string;
69
+ userHandle?: string | undefined;
70
+ };
71
+ type: string;
72
+ };
73
+ };
74
+ } | {
75
+ type: "FINISH_PASSKEY_REGISTER";
76
+ payload: {
77
+ passkeyRegistration: {
78
+ id: string;
79
+ rawId: string;
80
+ response: {
81
+ attestationObject: string;
82
+ clientDataJSON: string;
83
+ };
84
+ type: string;
85
+ };
86
+ email: string;
87
+ nickname: string;
88
+ device: string;
89
+ };
90
+ } | {
91
+ type: "FORCE_PASSWORD_METHOD";
92
+ payload: {
93
+ email: string;
94
+ };
95
+ } | {
96
+ type: "COMPLETE_GOOGLE_SIGN_IN";
97
+ payload: {
98
+ email: string;
99
+ passwordHash: string;
100
+ otp: string;
101
+ };
102
+ } | {
103
+ type: "VERIFY_LOGIN";
104
+ payload: {
105
+ email: string;
106
+ device: string;
107
+ passwordHash: string;
108
+ isForgeClaim?: boolean | undefined;
109
+ locale?: string | undefined;
110
+ };
111
+ } | {
112
+ type: "VERIFY_EMAIL_2FA";
113
+ payload: {
114
+ email: string;
115
+ secureCode: string;
116
+ passwordHash: string;
117
+ };
118
+ } | {
119
+ type: "RESEND_CODE";
120
+ payload: {
121
+ email: string;
122
+ nickname?: string | undefined;
123
+ device?: string | undefined;
124
+ passwordHash?: string | undefined;
125
+ isForgeClaim?: boolean | undefined;
126
+ locale?: string | undefined;
127
+ };
128
+ } | {
129
+ type: "CONFIRM_SW_CODE";
130
+ payload: {
131
+ email: string;
132
+ device: string;
133
+ passwordHash: string;
134
+ otp: string;
135
+ };
136
+ } | {
137
+ type: "CONFIRM_DEVICE_CODE";
138
+ payload: {
139
+ email: string;
140
+ passwordHash: string;
141
+ device: string;
142
+ secureCode: string;
143
+ };
144
+ } | {
145
+ type: "USE_HARDWARE_2FA";
146
+ } | {
147
+ type: "USE_SOFTWARE_2FA";
148
+ } | {
149
+ type: "VERIFY_HW_AUTH";
150
+ payload: {
151
+ email: string;
152
+ device: string;
153
+ passwordHash: string;
154
+ authId: string;
155
+ };
156
+ } | {
157
+ type: "SHOW_TERMS_MODAL";
158
+ } | {
159
+ type: "SEND_REGISTRATION_EMAIL";
160
+ payload: {
161
+ email: string;
162
+ nickname: string;
163
+ isForgeClaim?: boolean | undefined;
164
+ locale?: string | undefined;
165
+ };
166
+ } | {
167
+ type: "CLOSE_TERMS_MODAL";
168
+ } | {
169
+ type: "VERIFY_EMAIL";
170
+ payload: {
171
+ secureCode: string;
172
+ };
173
+ } | {
174
+ type: "COMPLETE_REGISTRATION";
175
+ payload: {
176
+ email: string;
177
+ nickname: string;
178
+ passwordHash: string;
179
+ device: string;
180
+ };
181
+ } | {
182
+ type: "SEND_CODE";
183
+ payload: {
184
+ email: string;
185
+ };
186
+ } | {
187
+ type: "CONFIRM_PASSWORD";
188
+ payload: {
189
+ email: string;
190
+ passwordHash: string;
191
+ };
192
+ } | {
193
+ type: "RESET_PASSWORD";
194
+ } | {
195
+ type: "LOGIN";
196
+ } | {
197
+ type: "FORGOT_PASSWORD";
198
+ } | {
199
+ type: "SIGN_UP";
200
+ } | {
201
+ type: "LOGIN_WITH_WEB3CONNECTOR";
202
+ } | {
203
+ type: "CONFIRM_WEB3_LOGIN";
204
+ } | {
205
+ type: "VERIFY_EMAIL_ELIGIBILITY";
206
+ email: string;
207
+ isForgeClaim?: boolean | undefined;
208
+ locale?: string | undefined;
209
+ } | {
210
+ type: "VERIFY_CLAIM_NFT_EMAIL_2FA";
211
+ payload: {
212
+ email: string;
213
+ emailCode: string;
214
+ };
215
+ } | {
216
+ type: "BACK_TO_LOGIN";
217
+ } | {
218
+ type: "SETUP_REGISTER_USER";
219
+ registerUser: {
220
+ email: string;
221
+ nickname: string;
222
+ salt: string;
223
+ };
224
+ } | {
225
+ type: "PASSKEY_NOT_SUPPORTED";
226
+ payload: {
227
+ error: string;
228
+ };
229
+ } | {
230
+ type: "SIGN_IN_WITH_PASSKEY";
231
+ } | {
232
+ type: "SET_CONDITIONAL_UI_PASSKEY";
233
+ }, {
234
+ value: any;
235
+ context: import("../machine/types").AuthMachineContext;
236
+ }, import("xstate").MarkAllImplementationsAsProvided<import("xstate").ResolveTypegenMeta<import("../machine/index.typegen").Typegen0, {
237
+ type: "INITIALIZE";
238
+ forgeId?: string | null | undefined;
239
+ } | {
240
+ type: "RESET";
241
+ } | {
242
+ type: "RESET_CONTEXT";
243
+ } | {
244
+ type: "REFRESH_ACCESS_TOKEN";
245
+ newAccessToken: string;
246
+ } | {
247
+ type: "ADVANCE_TO_PASSWORD";
248
+ } | {
249
+ type: "BACK";
250
+ } | {
251
+ type: "BACK_TO_IDLE";
252
+ } | {
253
+ type: "SELECT_CONNECTOR";
254
+ } | {
255
+ type: "NEXT";
256
+ payload: {
257
+ email: string;
258
+ };
259
+ } | {
260
+ type: "GOOGLE_LOGIN";
261
+ googleToken: string;
262
+ } | {
263
+ type: "START_PASSKEY_LOGIN";
264
+ payload: {
265
+ email: string;
266
+ };
267
+ } | {
268
+ type: "SELECT_PASSWORD";
269
+ payload: {
270
+ email: string;
271
+ };
272
+ } | {
273
+ type: "START_PASSKEY_REGISTER";
274
+ payload: {
275
+ device: string;
276
+ email: string;
277
+ nickname?: string | undefined;
278
+ };
279
+ } | {
280
+ type: "FINISH_PASSKEY_LOGIN";
281
+ payload: {
282
+ passkeyAuth: {
283
+ id: string;
284
+ rawId: string;
285
+ response: {
286
+ authenticatorData: string;
287
+ clientDataJSON: string;
288
+ signature: string;
289
+ userHandle?: string | undefined;
290
+ };
291
+ type: string;
292
+ };
293
+ };
294
+ } | {
295
+ type: "FINISH_PASSKEY_AUTH";
296
+ payload: {
297
+ passkeyAuth: {
298
+ id: string;
299
+ rawId: string;
300
+ response: {
301
+ authenticatorData: string;
302
+ clientDataJSON: string;
303
+ signature: string;
304
+ userHandle?: string | undefined;
305
+ };
306
+ type: string;
307
+ };
308
+ };
309
+ } | {
310
+ type: "FINISH_PASSKEY_REGISTER";
311
+ payload: {
312
+ passkeyRegistration: {
313
+ id: string;
314
+ rawId: string;
315
+ response: {
316
+ attestationObject: string;
317
+ clientDataJSON: string;
318
+ };
319
+ type: string;
320
+ };
321
+ email: string;
322
+ nickname: string;
323
+ device: string;
324
+ };
325
+ } | {
326
+ type: "FORCE_PASSWORD_METHOD";
327
+ payload: {
328
+ email: string;
329
+ };
330
+ } | {
331
+ type: "COMPLETE_GOOGLE_SIGN_IN";
332
+ payload: {
333
+ email: string;
334
+ passwordHash: string;
335
+ otp: string;
336
+ };
337
+ } | {
338
+ type: "VERIFY_LOGIN";
339
+ payload: {
340
+ email: string;
341
+ device: string;
342
+ passwordHash: string;
343
+ isForgeClaim?: boolean | undefined;
344
+ locale?: string | undefined;
345
+ };
346
+ } | {
347
+ type: "VERIFY_EMAIL_2FA";
348
+ payload: {
349
+ email: string;
350
+ secureCode: string;
351
+ passwordHash: string;
352
+ };
353
+ } | {
354
+ type: "RESEND_CODE";
355
+ payload: {
356
+ email: string;
357
+ nickname?: string | undefined;
358
+ device?: string | undefined;
359
+ passwordHash?: string | undefined;
360
+ isForgeClaim?: boolean | undefined;
361
+ locale?: string | undefined;
362
+ };
363
+ } | {
364
+ type: "CONFIRM_SW_CODE";
365
+ payload: {
366
+ email: string;
367
+ device: string;
368
+ passwordHash: string;
369
+ otp: string;
370
+ };
371
+ } | {
372
+ type: "CONFIRM_DEVICE_CODE";
373
+ payload: {
374
+ email: string;
375
+ passwordHash: string;
376
+ device: string;
377
+ secureCode: string;
378
+ };
379
+ } | {
380
+ type: "USE_HARDWARE_2FA";
381
+ } | {
382
+ type: "USE_SOFTWARE_2FA";
383
+ } | {
384
+ type: "VERIFY_HW_AUTH";
385
+ payload: {
386
+ email: string;
387
+ device: string;
388
+ passwordHash: string;
389
+ authId: string;
390
+ };
391
+ } | {
392
+ type: "SHOW_TERMS_MODAL";
393
+ } | {
394
+ type: "SEND_REGISTRATION_EMAIL";
395
+ payload: {
396
+ email: string;
397
+ nickname: string;
398
+ isForgeClaim?: boolean | undefined;
399
+ locale?: string | undefined;
400
+ };
401
+ } | {
402
+ type: "CLOSE_TERMS_MODAL";
403
+ } | {
404
+ type: "VERIFY_EMAIL";
405
+ payload: {
406
+ secureCode: string;
407
+ };
408
+ } | {
409
+ type: "COMPLETE_REGISTRATION";
410
+ payload: {
411
+ email: string;
412
+ nickname: string;
413
+ passwordHash: string;
414
+ device: string;
415
+ };
416
+ } | {
417
+ type: "SEND_CODE";
418
+ payload: {
419
+ email: string;
420
+ };
421
+ } | {
422
+ type: "CONFIRM_PASSWORD";
423
+ payload: {
424
+ email: string;
425
+ passwordHash: string;
426
+ };
427
+ } | {
428
+ type: "RESET_PASSWORD";
429
+ } | {
430
+ type: "LOGIN";
431
+ } | {
432
+ type: "FORGOT_PASSWORD";
433
+ } | {
434
+ type: "SIGN_UP";
435
+ } | {
436
+ type: "LOGIN_WITH_WEB3CONNECTOR";
437
+ } | {
438
+ type: "CONFIRM_WEB3_LOGIN";
439
+ } | {
440
+ type: "VERIFY_EMAIL_ELIGIBILITY";
441
+ email: string;
442
+ isForgeClaim?: boolean | undefined;
443
+ locale?: string | undefined;
444
+ } | {
445
+ type: "VERIFY_CLAIM_NFT_EMAIL_2FA";
446
+ payload: {
447
+ email: string;
448
+ emailCode: string;
449
+ };
450
+ } | {
451
+ type: "BACK_TO_LOGIN";
452
+ } | {
453
+ type: "SETUP_REGISTER_USER";
454
+ registerUser: {
455
+ email: string;
456
+ nickname: string;
457
+ salt: string;
458
+ };
459
+ } | {
460
+ type: "PASSKEY_NOT_SUPPORTED";
461
+ payload: {
462
+ error: string;
463
+ };
464
+ } | {
465
+ type: "SIGN_IN_WITH_PASSKEY";
466
+ } | {
467
+ type: "SET_CONDITIONAL_UI_PASSKEY";
468
+ }, import("xstate").BaseActionObject, import("../machine/types").AuthMachineServices>>>;
469
+ export default useAuthServiceInstance;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ const AuthProvider_1 = require("../components/AuthProvider");
5
+ const useAuthServiceInstance = () => {
6
+ const authServiceInstance = (0, react_1.useContext)(AuthProvider_1.AuthContext);
7
+ if (!authServiceInstance) {
8
+ throw new Error('useAuthServiceInstance must be used within an AuthProvider');
9
+ }
10
+ return authServiceInstance;
11
+ };
12
+ exports.default = useAuthServiceInstance;
13
+ //# sourceMappingURL=useAuthServiceInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAuthServiceInstance.js","sourceRoot":"","sources":["../../../src/hooks/useAuthServiceInstance.tsx"],"names":[],"mappings":";;AAAA,iCAAmC;AAEnC,6DAAyD;AAEzD,MAAM,sBAAsB,GAAG,GAAG,EAAE;IAClC,MAAM,mBAAmB,GAAG,IAAA,kBAAU,EAAC,0BAAW,CAAC,CAAC;IACpD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,118 @@
1
+ import { Locale } from '../get-dictionary';
2
+ declare const useDictionary: (locale: Locale) => {
3
+ accept: string;
4
+ password: string;
5
+ next: string;
6
+ formValidation: {
7
+ required: string;
8
+ invalidEmail: string;
9
+ passwordMinimum: string;
10
+ validName: string;
11
+ agreeTerms: string;
12
+ };
13
+ passwordRules: {
14
+ specialCharacter: string;
15
+ uppercaseLetter: string;
16
+ minimumEightCharacters: string;
17
+ passwordMatch: string;
18
+ dontUseYourNameOrEmail: string;
19
+ };
20
+ auth: {
21
+ poweredBy: string;
22
+ continueWith: string;
23
+ selectAnOption: string;
24
+ continueGoogle: string;
25
+ signWithPasskey: string;
26
+ continueApple: string;
27
+ layout: {
28
+ default: {
29
+ title: string;
30
+ subtitle: string;
31
+ };
32
+ mintNft: {
33
+ title: string;
34
+ subtitle: string;
35
+ };
36
+ };
37
+ web3Connector: {
38
+ acceptConnection: string;
39
+ connectionPending: string;
40
+ typeEmail: string;
41
+ };
42
+ login: {
43
+ login: string;
44
+ password: string;
45
+ continue: string;
46
+ passkey: string;
47
+ forgeLogin: string;
48
+ invalidEmailPassword: string;
49
+ somethingWrong: string;
50
+ invalidEmailPasswordDescription: string;
51
+ defaultError: string;
52
+ loginAccount: string;
53
+ enterEmail: string;
54
+ dontHaveAccount: string;
55
+ createAccount: string;
56
+ signUp: string;
57
+ enterPassword: string;
58
+ verifyEmail: string;
59
+ verifyEmailDescription: string;
60
+ wrongCode: string;
61
+ confirmCode: string;
62
+ resendCode: string;
63
+ inform2FACode: string;
64
+ newDevice: string;
65
+ touchHardware: string;
66
+ touchHardwareDescription: string;
67
+ cantVerify2fa: string;
68
+ tryAgain: string;
69
+ tryHardware: string;
70
+ useAnotherHardware: string;
71
+ useSw2fa: string;
72
+ useHw2fa: string;
73
+ selectMethodTitle: string;
74
+ selectMethodDescription: string;
75
+ selectMethodPassword: string;
76
+ selectMethodPasskey: string;
77
+ passkeyNotSupported: string;
78
+ passkeyNotSupportedDescription: string;
79
+ };
80
+ register: {
81
+ password: string;
82
+ passkey: string;
83
+ passkeyNotSupported: string;
84
+ continue: string;
85
+ title: string;
86
+ forgeTitle: string;
87
+ emailLabel: string;
88
+ emailPlaceholder: string;
89
+ emailInvitePlaceholder: string;
90
+ nicknameLabel: string;
91
+ agreeTermsPart1: string;
92
+ agreeTermsPart2: string;
93
+ buttonStart: string;
94
+ alreadyHaveAccount: string;
95
+ loginHere: string;
96
+ welcome: string;
97
+ invitedBy: string;
98
+ toJoin: string;
99
+ verifyEmail: string;
100
+ informCode: string;
101
+ wrongCode: string;
102
+ confirmCode: string;
103
+ resendCode: string;
104
+ createPassword: string;
105
+ passwordPlaceholder: string;
106
+ passwordLabel: string;
107
+ passwordConfirmPlaceholder: string;
108
+ passwordConfirmLabel: string;
109
+ termsTitle: string;
110
+ termsDescription: string;
111
+ selectMethodTitle: string;
112
+ selectMethodDescription: string;
113
+ selectMethodPassword: string;
114
+ selectMethodPasskey: string;
115
+ };
116
+ };
117
+ } | undefined;
118
+ export default useDictionary;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ const get_dictionary_1 = require("../get-dictionary");
5
+ const useDictionary = (locale) => {
6
+ const [dictionary, setDictionary] = (0, react_1.useState)();
7
+ (0, react_1.useEffect)(() => {
8
+ (0, get_dictionary_1.getDictionary)(locale).then((localeDictionary) => {
9
+ setDictionary(localeDictionary);
10
+ });
11
+ }, []);
12
+ return dictionary;
13
+ };
14
+ exports.default = useDictionary;
15
+ //# sourceMappingURL=useDictionary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDictionary.js","sourceRoot":"","sources":["../../../src/hooks/useDictionary.tsx"],"names":[],"mappings":";;AAAA,iCAA4C;AAE5C,sDAAsE;AAEtE,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,EAAE;IACvC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,GAAc,CAAC;IAE3D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAA,8BAAa,EAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAC9C,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import Auth, { AuthProps } from './Auth';
2
+ import { AuthProvider } from './components/AuthProvider';
3
+ import useAuthService from './hooks/useAuthService';
4
+ import { SessionUser } from './machine/types';
5
+ export type { AuthProps, SessionUser };
6
+ export { useAuthService, AuthProvider };
7
+ export default Auth;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AuthProvider = exports.useAuthService = void 0;
7
+ const Auth_1 = __importDefault(require("./Auth"));
8
+ const AuthProvider_1 = require("./components/AuthProvider");
9
+ Object.defineProperty(exports, "AuthProvider", { enumerable: true, get: function () { return AuthProvider_1.AuthProvider; } });
10
+ const useAuthService_1 = __importDefault(require("./hooks/useAuthService"));
11
+ exports.useAuthService = useAuthService_1.default;
12
+ exports.default = Auth_1.default;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyC;AACzC,4DAAyD;AAKhC,6FALhB,2BAAY,OAKgB;AAJrC,4EAAoD;AAI3C,yBAJF,wBAAc,CAIE;AACvB,kBAAe,cAAI,CAAC"}