@ttoss/react-auth-cognito 2.8.0 → 2.8.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/esm/index.js CHANGED
@@ -145,6 +145,12 @@ var Auth = /* @__PURE__ */__name(props => {
145
145
  newPassword
146
146
  }) => {
147
147
  try {
148
+ if (!email) {
149
+ throw new Error("Email is required to reset password");
150
+ }
151
+ if (!code) {
152
+ throw new Error("Confirmation code is required to reset password");
153
+ }
148
154
  await confirmResetPassword({
149
155
  confirmationCode: code,
150
156
  username: email,
@@ -171,7 +177,8 @@ var Auth = /* @__PURE__ */__name(props => {
171
177
  onForgotPasswordResetPassword,
172
178
  signUpTerms: props.signUpTerms,
173
179
  logo: props.logo,
174
- layout: props.layout
180
+ layout: props.layout,
181
+ maxForgotPasswordCodeLength: 6
175
182
  });
176
183
  }, "Auth");
177
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-auth-cognito",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "React authentication components using AWS Cognito",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -26,17 +26,17 @@
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
28
  "react-error-boundary": "^6.1.0",
29
- "@ttoss/react-auth-core": "^0.4.0"
29
+ "@ttoss/react-auth-core": "^0.4.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "aws-amplify": "^6.0.0",
33
33
  "react": ">=16.8.0",
34
- "@ttoss/components": "^2.13.0",
35
- "@ttoss/logger": "^0.7.4",
36
34
  "@ttoss/forms": "^0.41.0",
37
35
  "@ttoss/react-i18n": "^2.1.0",
38
36
  "@ttoss/react-notifications": "^2.6.0",
39
- "@ttoss/ui": "^6.6.0"
37
+ "@ttoss/logger": "^0.7.4",
38
+ "@ttoss/ui": "^6.6.0",
39
+ "@ttoss/components": "^2.13.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@jest/globals": "^29.7.0",
@@ -45,13 +45,13 @@
45
45
  "jest": "^30.2.0",
46
46
  "react": "^19.2.4",
47
47
  "tsup": "^8.5.1",
48
- "@ttoss/cloud-auth": "^0.13.13",
49
- "@ttoss/components": "^2.13.0",
50
48
  "@ttoss/config": "^1.36.0",
49
+ "@ttoss/cloud-auth": "^0.13.13",
51
50
  "@ttoss/forms": "^0.41.0",
52
- "@ttoss/react-i18n": "^2.1.0",
51
+ "@ttoss/components": "^2.13.0",
53
52
  "@ttoss/i18n-cli": "^0.7.39",
54
53
  "@ttoss/logger": "^0.7.4",
54
+ "@ttoss/react-i18n": "^2.1.0",
55
55
  "@ttoss/react-notifications": "^2.6.0",
56
56
  "@ttoss/test-utils": "^4.1.0",
57
57
  "@ttoss/ui": "^6.6.0"