@alore/auth-react-ui 1.2.0-alpha.13 → 1.2.0-alpha.15

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 (41) hide show
  1. package/dist/cjs/auth/ForgotPassword.d.ts +15 -0
  2. package/dist/cjs/auth/ForgotPassword.js +263 -0
  3. package/dist/cjs/auth/ForgotPassword.js.map +1 -0
  4. package/dist/cjs/auth/Login.js +3 -1
  5. package/dist/cjs/auth/Login.js.map +1 -1
  6. package/dist/cjs/components/Auth.js +42 -3
  7. package/dist/cjs/components/Auth.js.map +1 -1
  8. package/dist/cjs/components/AuthProvider.d.ts +16 -2
  9. package/dist/cjs/components/FormRules/helpers/index.js +1 -1
  10. package/dist/cjs/components/FormRules/helpers/index.js.map +1 -1
  11. package/dist/cjs/dictionaries/en.json +19 -0
  12. package/dist/cjs/dictionaries/pt.json +19 -0
  13. package/dist/cjs/get-dictionary.d.ts +57 -0
  14. package/dist/cjs/hooks/useAuthService.d.ts +48 -6
  15. package/dist/cjs/hooks/useAuthServiceInstance.d.ts +16 -2
  16. package/dist/cjs/hooks/useDictionary.d.ts +19 -0
  17. package/dist/cjs/machine/index.d.ts +32 -4
  18. package/dist/cjs/machine/index.js +96 -9
  19. package/dist/cjs/machine/index.js.map +1 -1
  20. package/dist/cjs/machine/types.d.ts +14 -1
  21. package/dist/mjs/auth/ForgotPassword.d.ts +15 -0
  22. package/dist/mjs/auth/ForgotPassword.js +224 -0
  23. package/dist/mjs/auth/ForgotPassword.js.map +1 -0
  24. package/dist/mjs/auth/Login.js +3 -1
  25. package/dist/mjs/auth/Login.js.map +1 -1
  26. package/dist/mjs/components/Auth.js +42 -3
  27. package/dist/mjs/components/Auth.js.map +1 -1
  28. package/dist/mjs/components/AuthProvider.d.ts +16 -2
  29. package/dist/mjs/components/FormRules/helpers/index.js +1 -1
  30. package/dist/mjs/components/FormRules/helpers/index.js.map +1 -1
  31. package/dist/mjs/dictionaries/en.json +19 -0
  32. package/dist/mjs/dictionaries/pt.json +19 -0
  33. package/dist/mjs/get-dictionary.d.ts +57 -0
  34. package/dist/mjs/hooks/useAuthService.d.ts +48 -6
  35. package/dist/mjs/hooks/useAuthServiceInstance.d.ts +16 -2
  36. package/dist/mjs/hooks/useDictionary.d.ts +19 -0
  37. package/dist/mjs/machine/index.d.ts +32 -4
  38. package/dist/mjs/machine/index.js +91 -9
  39. package/dist/mjs/machine/index.js.map +1 -1
  40. package/dist/mjs/machine/types.d.ts +14 -1
  41. package/package.json +2 -2
@@ -122,6 +122,25 @@
122
122
  "selectMethodDescription": "Select a method to register your account",
123
123
  "selectMethodPassword": "Login using a password",
124
124
  "selectMethodPasskey": "Login using a passkey"
125
+ },
126
+ "forgotPassword": {
127
+ "resetPassword": "Reset your password",
128
+ "resetPasswordDescription": "Please, inform your e-mail",
129
+ "sendCode": "Send code",
130
+ "emailSentTitle": "Code sent to your e-mail",
131
+ "emailSentDescription": "We sent you a e-mail with the instructions to reset your password.",
132
+ "backToLogin": "Back to login",
133
+ "newPasswordTitle": "Create a new password",
134
+ "newPasswordDescription": "Enter your new password below",
135
+ "passwordLabel": "New password",
136
+ "confirmPasswordLabel": "Confirm new password",
137
+ "confirmButton": "Reset password",
138
+ "successTitle": "New password created",
139
+ "successDescription": "Your 2FA settings will remain the same.",
140
+ "invalidLink": "Invalid or expired reset link",
141
+ "invalidLinkDescription": "This password reset link is invalid or has expired. Please request a new one.",
142
+ "expiredSessionTitle": "Reset session expired",
143
+ "expiredSessionDescription": "Your password reset session has expired. Please request a new password reset link."
125
144
  }
126
145
  }
127
146
  }
@@ -122,6 +122,25 @@
122
122
  "selectMethodDescription": "Selecione o método que deseja para criar sua conta",
123
123
  "selectMethodPassword": "Entre usando uma senha",
124
124
  "selectMethodPasskey": "Entre usando uma passkey"
125
+ },
126
+ "forgotPassword": {
127
+ "resetPassword": "Mudar sua senha",
128
+ "resetPasswordDescription": "Por favor informe seu e-mail",
129
+ "sendCode": "Enviar código",
130
+ "emailSentTitle": "Código enviado para seu e-mail",
131
+ "emailSentDescription": "Enviamos um e-mail com as instruções para modificar sua senha.",
132
+ "backToLogin": "Voltar para login",
133
+ "newPasswordTitle": "Crie uma nova senha",
134
+ "newPasswordDescription": "Digite sua nova senha abaixo",
135
+ "passwordLabel": "Nova senha",
136
+ "confirmPasswordLabel": "Confirme a nova senha",
137
+ "confirmButton": "Redefinir senha",
138
+ "successTitle": "Nova senha criada",
139
+ "successDescription": "Suas configurações de 2FA permanecerão as mesmas.",
140
+ "invalidLink": "Link inválido ou expirado",
141
+ "invalidLinkDescription": "Este link de redefinição de senha é inválido ou expirou. Por favor, solicite um novo.",
142
+ "expiredSessionTitle": "Sessão de redefinição expirada",
143
+ "expiredSessionDescription": "Sua sessão de redefinição de senha expirou. Por favor, solicite um novo link de redefinição de senha."
125
144
  }
126
145
  }
127
146
  }
@@ -129,6 +129,25 @@ export declare const dictionaries: {
129
129
  selectMethodPassword: string;
130
130
  selectMethodPasskey: string;
131
131
  };
132
+ forgotPassword: {
133
+ resetPassword: string;
134
+ resetPasswordDescription: string;
135
+ sendCode: string;
136
+ emailSentTitle: string;
137
+ emailSentDescription: string;
138
+ backToLogin: string;
139
+ newPasswordTitle: string;
140
+ newPasswordDescription: string;
141
+ passwordLabel: string;
142
+ confirmPasswordLabel: string;
143
+ confirmButton: string;
144
+ successTitle: string;
145
+ successDescription: string;
146
+ invalidLink: string;
147
+ invalidLinkDescription: string;
148
+ expiredSessionTitle: string;
149
+ expiredSessionDescription: string;
150
+ };
132
151
  };
133
152
  }>;
134
153
  pt: () => Promise<{
@@ -256,6 +275,25 @@ export declare const dictionaries: {
256
275
  selectMethodPassword: string;
257
276
  selectMethodPasskey: string;
258
277
  };
278
+ forgotPassword: {
279
+ resetPassword: string;
280
+ resetPasswordDescription: string;
281
+ sendCode: string;
282
+ emailSentTitle: string;
283
+ emailSentDescription: string;
284
+ backToLogin: string;
285
+ newPasswordTitle: string;
286
+ newPasswordDescription: string;
287
+ passwordLabel: string;
288
+ confirmPasswordLabel: string;
289
+ confirmButton: string;
290
+ successTitle: string;
291
+ successDescription: string;
292
+ invalidLink: string;
293
+ invalidLinkDescription: string;
294
+ expiredSessionTitle: string;
295
+ expiredSessionDescription: string;
296
+ };
259
297
  };
260
298
  }>;
261
299
  };
@@ -384,6 +422,25 @@ export declare const getDictionary: (locale: Locale) => Promise<{
384
422
  selectMethodPassword: string;
385
423
  selectMethodPasskey: string;
386
424
  };
425
+ forgotPassword: {
426
+ resetPassword: string;
427
+ resetPasswordDescription: string;
428
+ sendCode: string;
429
+ emailSentTitle: string;
430
+ emailSentDescription: string;
431
+ backToLogin: string;
432
+ newPasswordTitle: string;
433
+ newPasswordDescription: string;
434
+ passwordLabel: string;
435
+ confirmPasswordLabel: string;
436
+ confirmButton: string;
437
+ successTitle: string;
438
+ successDescription: string;
439
+ invalidLink: string;
440
+ invalidLinkDescription: string;
441
+ expiredSessionTitle: string;
442
+ expiredSessionDescription: string;
443
+ };
387
444
  };
388
445
  }>;
389
446
  export type Dictionary = Awaited<ReturnType<typeof getDictionary>>;
@@ -201,15 +201,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
201
201
  type: "SEND_CODE";
202
202
  payload: {
203
203
  email: string;
204
+ locale?: string | undefined;
204
205
  };
205
206
  } | {
206
207
  type: "CONFIRM_PASSWORD";
207
208
  payload: {
208
- email: string;
209
+ salt: string;
210
+ token: string;
209
211
  passwordHash: string;
212
+ device?: string | undefined;
210
213
  };
211
214
  } | {
212
215
  type: "RESET_PASSWORD";
216
+ payload: {
217
+ salt: string;
218
+ token: string;
219
+ };
213
220
  } | {
214
221
  type: "LOGIN";
215
222
  } | {
@@ -457,15 +464,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
457
464
  type: "SEND_CODE";
458
465
  payload: {
459
466
  email: string;
467
+ locale?: string | undefined;
460
468
  };
461
469
  } | {
462
470
  type: "CONFIRM_PASSWORD";
463
471
  payload: {
464
- email: string;
472
+ salt: string;
473
+ token: string;
465
474
  passwordHash: string;
475
+ device?: string | undefined;
466
476
  };
467
477
  } | {
468
478
  type: "RESET_PASSWORD";
479
+ payload: {
480
+ salt: string;
481
+ token: string;
482
+ };
469
483
  } | {
470
484
  type: "LOGIN";
471
485
  } | {
@@ -710,15 +724,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
710
724
  type: "SEND_CODE";
711
725
  payload: {
712
726
  email: string;
727
+ locale?: string | undefined;
713
728
  };
714
729
  } | {
715
730
  type: "CONFIRM_PASSWORD";
716
731
  payload: {
717
- email: string;
732
+ salt: string;
733
+ token: string;
718
734
  passwordHash: string;
735
+ device?: string | undefined;
719
736
  };
720
737
  } | {
721
738
  type: "RESET_PASSWORD";
739
+ payload: {
740
+ salt: string;
741
+ token: string;
742
+ };
722
743
  } | {
723
744
  type: "LOGIN";
724
745
  } | {
@@ -963,15 +984,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
963
984
  type: "SEND_CODE";
964
985
  payload: {
965
986
  email: string;
987
+ locale?: string | undefined;
966
988
  };
967
989
  } | {
968
990
  type: "CONFIRM_PASSWORD";
969
991
  payload: {
970
- email: string;
992
+ salt: string;
993
+ token: string;
971
994
  passwordHash: string;
995
+ device?: string | undefined;
972
996
  };
973
997
  } | {
974
998
  type: "RESET_PASSWORD";
999
+ payload: {
1000
+ salt: string;
1001
+ token: string;
1002
+ };
975
1003
  } | {
976
1004
  type: "LOGIN";
977
1005
  } | {
@@ -1216,15 +1244,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
1216
1244
  type: "SEND_CODE";
1217
1245
  payload: {
1218
1246
  email: string;
1247
+ locale?: string | undefined;
1219
1248
  };
1220
1249
  } | {
1221
1250
  type: "CONFIRM_PASSWORD";
1222
1251
  payload: {
1223
- email: string;
1252
+ salt: string;
1253
+ token: string;
1224
1254
  passwordHash: string;
1255
+ device?: string | undefined;
1225
1256
  };
1226
1257
  } | {
1227
1258
  type: "RESET_PASSWORD";
1259
+ payload: {
1260
+ salt: string;
1261
+ token: string;
1262
+ };
1228
1263
  } | {
1229
1264
  type: "LOGIN";
1230
1265
  } | {
@@ -1472,15 +1507,22 @@ declare const useAuthService: () => readonly [import("xstate").State<import("../
1472
1507
  type: "SEND_CODE";
1473
1508
  payload: {
1474
1509
  email: string;
1510
+ locale?: string | undefined;
1475
1511
  };
1476
1512
  } | {
1477
1513
  type: "CONFIRM_PASSWORD";
1478
1514
  payload: {
1479
- email: string;
1515
+ salt: string;
1516
+ token: string;
1480
1517
  passwordHash: string;
1518
+ device?: string | undefined;
1481
1519
  };
1482
1520
  } | {
1483
1521
  type: "RESET_PASSWORD";
1522
+ payload: {
1523
+ salt: string;
1524
+ token: string;
1525
+ };
1484
1526
  } | {
1485
1527
  type: "LOGIN";
1486
1528
  } | {
@@ -201,15 +201,22 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
201
201
  type: "SEND_CODE";
202
202
  payload: {
203
203
  email: string;
204
+ locale?: string | undefined;
204
205
  };
205
206
  } | {
206
207
  type: "CONFIRM_PASSWORD";
207
208
  payload: {
208
- email: string;
209
+ salt: string;
210
+ token: string;
209
211
  passwordHash: string;
212
+ device?: string | undefined;
210
213
  };
211
214
  } | {
212
215
  type: "RESET_PASSWORD";
216
+ payload: {
217
+ salt: string;
218
+ token: string;
219
+ };
213
220
  } | {
214
221
  type: "LOGIN";
215
222
  } | {
@@ -457,15 +464,22 @@ declare const useAuthServiceInstance: () => import("xstate").Interpreter<import(
457
464
  type: "SEND_CODE";
458
465
  payload: {
459
466
  email: string;
467
+ locale?: string | undefined;
460
468
  };
461
469
  } | {
462
470
  type: "CONFIRM_PASSWORD";
463
471
  payload: {
464
- email: string;
472
+ salt: string;
473
+ token: string;
465
474
  passwordHash: string;
475
+ device?: string | undefined;
466
476
  };
467
477
  } | {
468
478
  type: "RESET_PASSWORD";
479
+ payload: {
480
+ salt: string;
481
+ token: string;
482
+ };
469
483
  } | {
470
484
  type: "LOGIN";
471
485
  } | {
@@ -124,6 +124,25 @@ declare const useDictionary: (locale: Locale) => {
124
124
  selectMethodPassword: string;
125
125
  selectMethodPasskey: string;
126
126
  };
127
+ forgotPassword: {
128
+ resetPassword: string;
129
+ resetPasswordDescription: string;
130
+ sendCode: string;
131
+ emailSentTitle: string;
132
+ emailSentDescription: string;
133
+ backToLogin: string;
134
+ newPasswordTitle: string;
135
+ newPasswordDescription: string;
136
+ passwordLabel: string;
137
+ confirmPasswordLabel: string;
138
+ confirmButton: string;
139
+ successTitle: string;
140
+ successDescription: string;
141
+ invalidLink: string;
142
+ invalidLinkDescription: string;
143
+ expiredSessionTitle: string;
144
+ expiredSessionDescription: string;
145
+ };
127
146
  };
128
147
  } | undefined;
129
148
  export default useDictionary;
@@ -202,15 +202,22 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
202
202
  type: "SEND_CODE";
203
203
  payload: {
204
204
  email: string;
205
+ locale?: string | undefined;
205
206
  };
206
207
  } | {
207
208
  type: "CONFIRM_PASSWORD";
208
209
  payload: {
209
- email: string;
210
+ salt: string;
211
+ token: string;
210
212
  passwordHash: string;
213
+ device?: string | undefined;
211
214
  };
212
215
  } | {
213
216
  type: "RESET_PASSWORD";
217
+ payload: {
218
+ salt: string;
219
+ token: string;
220
+ };
214
221
  } | {
215
222
  type: "LOGIN";
216
223
  } | {
@@ -458,15 +465,22 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
458
465
  type: "SEND_CODE";
459
466
  payload: {
460
467
  email: string;
468
+ locale?: string | undefined;
461
469
  };
462
470
  } | {
463
471
  type: "CONFIRM_PASSWORD";
464
472
  payload: {
465
- email: string;
473
+ salt: string;
474
+ token: string;
466
475
  passwordHash: string;
476
+ device?: string | undefined;
467
477
  };
468
478
  } | {
469
479
  type: "RESET_PASSWORD";
480
+ payload: {
481
+ salt: string;
482
+ token: string;
483
+ };
470
484
  } | {
471
485
  type: "LOGIN";
472
486
  } | {
@@ -712,15 +726,22 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
712
726
  type: "SEND_CODE";
713
727
  payload: {
714
728
  email: string;
729
+ locale?: string | undefined;
715
730
  };
716
731
  } | {
717
732
  type: "CONFIRM_PASSWORD";
718
733
  payload: {
719
- email: string;
734
+ salt: string;
735
+ token: string;
720
736
  passwordHash: string;
737
+ device?: string | undefined;
721
738
  };
722
739
  } | {
723
740
  type: "RESET_PASSWORD";
741
+ payload: {
742
+ salt: string;
743
+ token: string;
744
+ };
724
745
  } | {
725
746
  type: "LOGIN";
726
747
  } | {
@@ -968,15 +989,22 @@ export declare const authService: (services: {}, context: AuthMachineContext) =>
968
989
  type: "SEND_CODE";
969
990
  payload: {
970
991
  email: string;
992
+ locale?: string | undefined;
971
993
  };
972
994
  } | {
973
995
  type: "CONFIRM_PASSWORD";
974
996
  payload: {
975
- email: string;
997
+ salt: string;
998
+ token: string;
976
999
  passwordHash: string;
1000
+ device?: string | undefined;
977
1001
  };
978
1002
  } | {
979
1003
  type: "RESET_PASSWORD";
1004
+ payload: {
1005
+ salt: string;
1006
+ token: string;
1007
+ };
980
1008
  } | {
981
1009
  type: "LOGIN";
982
1010
  } | {