@rpcbase/client 0.30.0 → 0.31.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.
@@ -4,7 +4,7 @@ import {ActivityIndicator} from "react-native"
4
4
  import page from "page"
5
5
 
6
6
  import post from "../../helpers/post"
7
- import {set_is_signed_in} from "../index"
7
+ import {set_is_signed_in, set_uid} from "../index"
8
8
 
9
9
  const SignOut = () => {
10
10
 
@@ -14,6 +14,7 @@ const SignOut = () => {
14
14
  setTimeout(async() => {
15
15
  const res = await post("/api/v1/auth/sign_out")
16
16
  if (res.status === "ok") {
17
+ set_uid(null)
17
18
  set_is_signed_in(false)
18
19
  localStorage.clear()
19
20
  setIsSignedOut(true)
package/auth/index.js CHANGED
@@ -33,7 +33,7 @@ const run_session_check = async() => {
33
33
  __is_authenticated = res.is_signed_in
34
34
  // cache user_id in localStorage
35
35
  if (__user_id) {
36
- localStorage.setItem(UID_STORAGE_KEY, user_id)
36
+ localStorage.setItem(UID_STORAGE_KEY, __user_id)
37
37
  }
38
38
  }
39
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },