@rpcbase/client 0.147.0 → 0.148.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 +1 -1
- package/auth/SignUp/index.js +1 -1
- package/auth/index.js +2 -2
- package/package.json +1 -1
package/auth/SignIn/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const SignIn = ({
|
|
|
56
56
|
assert(res.user_id, "missing user_id")
|
|
57
57
|
|
|
58
58
|
setUid(user_id)
|
|
59
|
-
set_tenant_id(user_id.slice(
|
|
59
|
+
set_tenant_id(user_id.slice(8, 16))
|
|
60
60
|
set_is_signed_in(true)
|
|
61
61
|
|
|
62
62
|
// we must now reconnect on the websocket as we now have a new cookie
|
package/auth/SignUp/index.js
CHANGED
|
@@ -32,7 +32,7 @@ const SignUp = ({
|
|
|
32
32
|
if (res.status === "ok") {
|
|
33
33
|
const {user_id} = res
|
|
34
34
|
setUid(user_id)
|
|
35
|
-
set_tenant_id(user_id.slice(
|
|
35
|
+
set_tenant_id(user_id.slice(8, 16))
|
|
36
36
|
set_is_signed_in(true)
|
|
37
37
|
|
|
38
38
|
// we must now reconnect on the websocket as we have a new cookie
|
package/auth/index.js
CHANGED
|
@@ -63,7 +63,7 @@ const run_session_check = async() => {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
__user_id = res.user_id
|
|
66
|
-
__tenant_id = __user_id.slice(
|
|
66
|
+
__tenant_id = __user_id.slice(8, 16)
|
|
67
67
|
|
|
68
68
|
// save tenant id
|
|
69
69
|
if (__tenant_id) {
|
|
@@ -116,7 +116,7 @@ export const setUid = (val) => {
|
|
|
116
116
|
__user_id = val
|
|
117
117
|
|
|
118
118
|
if (typeof val === "string") {
|
|
119
|
-
const tenant_id_prefix = val.slice(
|
|
119
|
+
const tenant_id_prefix = val.slice(8, 16)
|
|
120
120
|
storage.setItem(uid_storage_key(tenant_id_prefix), val)
|
|
121
121
|
}
|
|
122
122
|
}
|