@rpcbase/client 0.123.0 → 0.124.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/SignIn/index.js +2 -2
- package/auth/SignUp/index.js +2 -2
- package/auth/index.js +1 -1
- package/auth/sign_out.js +2 -2
- package/package.json +1 -1
package/auth/SignIn/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import debug from "debug"
|
|
|
9
9
|
import post from "../../helpers/post"
|
|
10
10
|
import {reconnect as rts_reconnect} from "../../rts"
|
|
11
11
|
|
|
12
|
-
import {set_is_signed_in,
|
|
12
|
+
import {set_is_signed_in, setUid, set_tenant_id} from "../index"
|
|
13
13
|
import Footer from "../Footer"
|
|
14
14
|
|
|
15
15
|
import "./sign-in.scss"
|
|
@@ -55,7 +55,7 @@ const SignIn = ({
|
|
|
55
55
|
const {user_id} = res
|
|
56
56
|
assert(res.user_id, "missing user_id")
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
setUid(user_id)
|
|
59
59
|
set_tenant_id(user_id.slice(0, 8))
|
|
60
60
|
set_is_signed_in(true)
|
|
61
61
|
|
package/auth/SignUp/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import page from "page"
|
|
|
4
4
|
|
|
5
5
|
import {reconnect as rts_reconnect} from "../../rts"
|
|
6
6
|
|
|
7
|
-
import {set_is_signed_in,
|
|
7
|
+
import {set_is_signed_in, setUid, set_tenant_id} from "../index"
|
|
8
8
|
import post from "../../helpers/post"
|
|
9
9
|
import Footer from "../Footer"
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ const SignUp = ({
|
|
|
31
31
|
|
|
32
32
|
if (res.status === "ok") {
|
|
33
33
|
const {user_id} = res
|
|
34
|
-
|
|
34
|
+
setUid(user_id)
|
|
35
35
|
set_tenant_id(user_id.slice(0, 8))
|
|
36
36
|
set_is_signed_in(true)
|
|
37
37
|
|
package/auth/index.js
CHANGED
package/auth/sign_out.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
|
|
3
|
-
import {set_is_signed_in,
|
|
3
|
+
import {set_is_signed_in, setUid, set_tenant_id} from "./index"
|
|
4
4
|
|
|
5
5
|
export const sign_out = () => {
|
|
6
|
-
|
|
6
|
+
setUid(null)
|
|
7
7
|
set_tenant_id(null)
|
|
8
8
|
set_is_signed_in(false)
|
|
9
9
|
localStorage.clear()
|