@frontegg/redux-store 5.17.0 → 5.18.0

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/auth/index.js CHANGED
@@ -2128,10 +2128,13 @@ function* activateAccount(_a) {
2128
2128
  onRedirectTo(routes.loginUrl, { preserveQueryParams: true });
2129
2129
  }
2130
2130
  else {
2131
- const user = yield call(api.auth.generateLoginResponse, data);
2132
- yield put(actions.loadTenants());
2131
+ yield put(actions.setActivateState({ step: ActivateAccountStep.success }));
2132
+ const { user, tenants } = yield call(api.auth.generateLoginResponseV2, data);
2133
+ yield put(actions.setTenantsState({ tenants, loading: false }));
2133
2134
  yield put(actions.setState({ user, isAuthenticated: true }));
2135
+ yield delay$1(1000);
2134
2136
  yield afterAuthNavigation();
2137
+ yield put(actions.resetActivateState());
2135
2138
  }
2136
2139
  callback === null || callback === void 0 ? void 0 : callback(true);
2137
2140
  }
@@ -2130,10 +2130,13 @@ function* activateAccount(_a) {
2130
2130
  onRedirectTo(routes.loginUrl, { preserveQueryParams: true });
2131
2131
  }
2132
2132
  else {
2133
- const user = yield effects.call(restApi.api.auth.generateLoginResponse, data);
2134
- yield effects.put(actions.loadTenants());
2133
+ yield effects.put(actions.setActivateState({ step: exports.ActivateAccountStep.success }));
2134
+ const { user, tenants } = yield effects.call(restApi.api.auth.generateLoginResponseV2, data);
2135
+ yield effects.put(actions.setTenantsState({ tenants, loading: false }));
2135
2136
  yield effects.put(actions.setState({ user, isAuthenticated: true }));
2137
+ yield effects.delay(1000);
2136
2138
  yield afterAuthNavigation();
2139
+ yield effects.put(actions.resetActivateState());
2137
2140
  }
2138
2141
  callback === null || callback === void 0 ? void 0 : callback(true);
2139
2142
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
3
  "libName": "FronteggReduxStore",
4
- "version": "5.17.0",
4
+ "version": "5.18.0",
5
5
  "author": "Frontegg LTD",
6
6
  "main": "./node/index.js",
7
7
  "module": "./index.js",