mario-education 2.4.317-release → 2.4.318-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.
package/dist/index.js CHANGED
@@ -44818,11 +44818,13 @@ var useSandbox = function useSandbox() {
44818
44818
  var redirectLogin = function redirectLogin(isSandboxMode) {
44819
44819
  alert("Sandbox mode is " + (isSandboxMode ? "on" : "off") + " now but cannot switch to your sandbox account! You need to login manually");
44820
44820
  localStorage.removeItem(marioCore.ACCESS_TOKEN);
44821
+ sessionStorage.removeItem(marioCore.ACCESS_TOKEN);
44821
44822
  dispatch(marioCore.reset());
44822
44823
  history.push("/login");
44823
44824
  };
44824
44825
 
44825
44826
  var changeUser = function changeUser(data, isSandboxMode) {
44827
+ var isSessionUserBrowser = sessionStorage.getItem("IS_USER_SESSION_BROWSER");
44826
44828
  var token = data.token,
44827
44829
  id = data.id,
44828
44830
  firstName = data.firstName,
@@ -44830,7 +44832,13 @@ var useSandbox = function useSandbox() {
44830
44832
  roles = data.roles,
44831
44833
  email = data.email,
44832
44834
  profileImageFileName = data.profileImageFileName;
44833
- localStorage.setItem(marioCore.ACCESS_TOKEN, token);
44835
+
44836
+ if (!isSessionUserBrowser) {
44837
+ localStorage.setItem(marioCore.ACCESS_TOKEN, token);
44838
+ } else {
44839
+ sessionStorage.setItem(marioCore.ACCESS_TOKEN, token);
44840
+ }
44841
+
44834
44842
  localStorage.removeItem(marioCore.NOTIFICATION_ALERT_KEY);
44835
44843
  localStorage.removeItem("SESSION_TIME");
44836
44844
  dispatch(marioCore.setUser({