@ttoss/react-auth 2.5.12 → 2.5.13

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
@@ -1,6 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
 
3
3
  // src/Auth.tsx
4
+ import { useI18n as useI18n6 } from "@ttoss/react-i18n";
4
5
  import { useNotifications as useNotifications2 } from "@ttoss/react-notifications";
5
6
  import { Flex as Flex5 } from "@ttoss/ui";
6
7
  import { confirmResetPassword, confirmSignUp, resendSignUpCode, resetPassword, signIn, signUp } from "aws-amplify/auth";
@@ -885,6 +886,9 @@ var AuthSignUp = props => {
885
886
  // src/Auth.tsx
886
887
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
887
888
  var AuthLogic = props => {
889
+ const {
890
+ intl
891
+ } = useI18n6();
888
892
  const {
889
893
  isAuthenticated
890
894
  } = useAuth();
@@ -928,10 +932,17 @@ var AuthLogic = props => {
928
932
  email
929
933
  }
930
934
  });
931
- } else {
935
+ } else if (result.nextStep.signInStep === "DONE") {
932
936
  addNotification({
933
- type: "error",
934
- message: "Unknown error"
937
+ viewType: "toast",
938
+ type: "success",
939
+ message: intl.formatMessage({
940
+ id: "EO/33N",
941
+ defaultMessage: [{
942
+ "type": 0,
943
+ "value": "Signed in successfully"
944
+ }]
945
+ })
935
946
  });
936
947
  }
937
948
  } catch (error) {
@@ -942,7 +953,7 @@ var AuthLogic = props => {
942
953
  } finally {
943
954
  setLoading(false);
944
955
  }
945
- }, [addNotification, setLoading]);
956
+ }, [addNotification, intl, setLoading]);
946
957
  const onSignUp = React5.useCallback(async ({
947
958
  email,
948
959
  password
@@ -67,6 +67,12 @@
67
67
  "value": " characters"
68
68
  }
69
69
  ],
70
+ "EO/33N": [
71
+ {
72
+ "type": 0,
73
+ "value": "Signed in successfully"
74
+ }
75
+ ],
70
76
  "EZ3YF2": [
71
77
  {
72
78
  "type": 0,
package/i18n/lang/en.json CHANGED
@@ -34,6 +34,9 @@
34
34
  "Co3exe": {
35
35
  "defaultMessage": "By signing up, you agree to the following Terms and Conditions."
36
36
  },
37
+ "EO/33N": {
38
+ "defaultMessage": "Signed in successfully"
39
+ },
37
40
  "EZ3YF2": {
38
41
  "defaultMessage": "Sign up",
39
42
  "description": "Sign up"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-auth",
3
- "version": "2.5.12",
3
+ "version": "2.5.13",
4
4
  "description": "ttoss authentication module for React apps.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -27,8 +27,8 @@
27
27
  "peerDependencies": {
28
28
  "aws-amplify": "^6.0.0",
29
29
  "react": ">=16.8.0",
30
- "@ttoss/components": "^2.2.6",
31
30
  "@ttoss/forms": "^0.29.7",
31
+ "@ttoss/components": "^2.2.6",
32
32
  "@ttoss/react-i18n": "^2.0.10",
33
33
  "@ttoss/react-notifications": "^2.1.12",
34
34
  "@ttoss/ui": "^5.5.4"
@@ -45,8 +45,8 @@
45
45
  "@ttoss/config": "^1.35.2",
46
46
  "@ttoss/i18n-cli": "^0.7.27",
47
47
  "@ttoss/react-i18n": "^2.0.10",
48
- "@ttoss/forms": "^0.29.7",
49
48
  "@ttoss/react-notifications": "^2.1.12",
49
+ "@ttoss/forms": "^0.29.7",
50
50
  "@ttoss/test-utils": "^2.1.22",
51
51
  "@ttoss/ui": "^5.5.4"
52
52
  },