mario-core 2.9.190-release → 2.9.192-release

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.
@@ -7,7 +7,7 @@ declare type ForgotPasswordInfo = {
7
7
  declare const useForgotPassword: () => {
8
8
  defaultInfo: ForgotPasswordInfo;
9
9
  forgotPasswordRequest: (data: any) => Promise<void>;
10
- checkResetTokenRequest: (token: string) => Promise<void>;
10
+ checkResetTokenRequest: (token: string, key: string) => Promise<void>;
11
11
  validLink: boolean;
12
12
  resetPasswordRequest: (data: any) => Promise<void>;
13
13
  openLogin: boolean;
package/dist/index.js CHANGED
@@ -22186,9 +22186,10 @@ var getUserNewPassword = function getUserNewPassword(userId) {
22186
22186
  }
22187
22187
  });
22188
22188
  };
22189
- var checkResetToken = function checkResetToken(token) {
22189
+ var checkResetToken = function checkResetToken(token, key) {
22190
22190
  return api.post(ACCOUNT_URL + "/checkResetToken", {
22191
- token: token
22191
+ token: token,
22192
+ key: key
22192
22193
  });
22193
22194
  };
22194
22195
  var resetPassword = function resetPassword(data) {
@@ -22864,8 +22865,11 @@ var LOGIN = "/login";
22864
22865
  var TITLE$1 = "Log in";
22865
22866
 
22866
22867
  var useForgotPassword = function useForgotPassword() {
22868
+ var _query$get;
22869
+
22867
22870
  var query = new URLSearchParams(reactRouterDom.useLocation().search);
22868
22871
  var token = query.get("token");
22872
+ var key = (_query$get = query.get("key")) != null ? _query$get : "";
22869
22873
  var dispatch = reactRedux.useDispatch();
22870
22874
  var history = reactRouterDom.useHistory();
22871
22875
 
@@ -22938,7 +22942,7 @@ var useForgotPassword = function useForgotPassword() {
22938
22942
  return Promise.reject(e);
22939
22943
  }
22940
22944
  }, []);
22941
- var checkResetTokenRequest = React.useCallback(function (token) {
22945
+ var checkResetTokenRequest = React.useCallback(function (token, key) {
22942
22946
  try {
22943
22947
  var _temp7 = function _temp7() {
22944
22948
  dispatch(setLoading(false));
@@ -22947,7 +22951,7 @@ var useForgotPassword = function useForgotPassword() {
22947
22951
  dispatch(setLoading(true));
22948
22952
 
22949
22953
  var _temp8 = _catch(function () {
22950
- return Promise.resolve(checkResetToken(token)).then(function (res) {
22954
+ return Promise.resolve(checkResetToken(token, key)).then(function (res) {
22951
22955
  if (res.data) {
22952
22956
  setInitialValues(_extends({}, initialValues, {
22953
22957
  token: token,
@@ -23011,7 +23015,7 @@ var useForgotPassword = function useForgotPassword() {
23011
23015
  }, [executeRecaptcha]);
23012
23016
  var handleVerify = React.useCallback(function () {}, []);
23013
23017
  React.useEffect(function () {
23014
- checkResetTokenRequest(token);
23018
+ checkResetTokenRequest(token, key);
23015
23019
  }, []);
23016
23020
  return {
23017
23021
  defaultInfo: defaultInfo$1,