@dexteel/mesf-core 3.10.3 → 3.10.5

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/index.esm.js CHANGED
@@ -5461,7 +5461,6 @@ var AuthContext = React__default.createContext({});
5461
5461
  var AuthProvider = function (_a) {
5462
5462
  var children = _a.children, authConfig = _a.authConfig;
5463
5463
  var useTokenHook = useToken();
5464
- console.log(useTokenHook.token);
5465
5464
  return (React__default.createElement(React__default.Fragment, null,
5466
5465
  React__default.createElement(AuthContext.Provider, { value: useTokenHook },
5467
5466
  !!useTokenHook.token && React__default.createElement(Authenticated, null, children),
@@ -5473,7 +5472,15 @@ var Authenticated = function (_a) {
5473
5472
  };
5474
5473
  var Unauthenticated = function (_a) {
5475
5474
  var authConfig = _a.authConfig;
5476
- return (React__default.createElement(Login, { authConfig: authConfig }));
5475
+ var clearUserData = useContext(AuthContext).clearUserData;
5476
+ var params = useRef((new URL(document.location)).searchParams);
5477
+ useEffect(function () {
5478
+ clearUserData();
5479
+ var newUrl = window.location.origin
5480
+ + '?' + params.current.toString();
5481
+ window.history.replaceState({ path: newUrl }, '', newUrl);
5482
+ }, []);
5483
+ return React__default.createElement(Login, { authConfig: authConfig });
5477
5484
  };
5478
5485
 
5479
5486
  var LoginWithEmailAndPassword = function () {
@@ -5678,7 +5685,6 @@ function Login(_a) {
5678
5685
  setOpen(false);
5679
5686
  params.current["delete"]('message');
5680
5687
  var newUrl = window.location.origin
5681
- + window.location.pathname
5682
5688
  + '?' + params.current.toString();
5683
5689
  window.history.replaceState({ path: newUrl }, '', newUrl);
5684
5690
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexteel/mesf-core",
3
- "version": "3.10.3",
3
+ "version": "3.10.5",
4
4
  "author": "Dexteel Team",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",