@rpcbase/client 0.21.0 → 0.23.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.
@@ -29,7 +29,8 @@ const ForgotPassword = ({name, logo}) => {
29
29
  setEmail(decoded)
30
30
  // remove the hash
31
31
  // isn't there a better way
32
- history.pushState(
32
+ // fixes go back twice on change password
33
+ history.replaceState(
33
34
  "",
34
35
  document.title,
35
36
  window.location.pathname + window.location.search
package/auth/index.js CHANGED
@@ -38,6 +38,9 @@ const run_session_check = async() => {
38
38
  }
39
39
  }
40
40
 
41
+ // Force trigger run first session check
42
+ run_session_check()
43
+
41
44
  // manually run first check
42
45
  // TODO: this should come from localStorage
43
46
  const redirect_sign_in = (ctx) => {
@@ -69,7 +72,8 @@ export const session_restrict = (ctx, next) => {
69
72
  } else {
70
73
  log("AUTH", JSON.stringify(__is_authenticated))
71
74
  log("NOT AUTHENTICATED, REDIRECT HERE")
72
- next()
75
+ redirect_sign_in(ctx)
76
+ // next()
73
77
  }
74
78
  }
75
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },