@rpcbase/client 0.187.0 → 0.191.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/index.js +8 -9
- package/package.json +4 -1
package/auth/index.js
CHANGED
|
@@ -27,6 +27,14 @@ const purgePendingSignedInStatusCallbacks = () => {
|
|
|
27
27
|
__pendingSignedInStatusCallbacks = []
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export const setIsSignedIn = (val) => {
|
|
31
|
+
__isSignedIn = val
|
|
32
|
+
purgePendingSignedInStatusCallbacks() // IMPORTANT: call and purge all pending callbacks
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const getIsSignedIn = () => __isSignedIn
|
|
36
|
+
|
|
37
|
+
|
|
30
38
|
const getQueryStringAuthId = () => {
|
|
31
39
|
const url = new URL(window.location.href)
|
|
32
40
|
const val = url.searchParams.get("auth_id")
|
|
@@ -37,7 +45,6 @@ const getQueryStringAuthId = () => {
|
|
|
37
45
|
return null
|
|
38
46
|
}
|
|
39
47
|
|
|
40
|
-
|
|
41
48
|
const runSessionCheck = async() => {
|
|
42
49
|
// TODO: TMP: we're skipping the session check on mobile for now,
|
|
43
50
|
// this assumes having a token on mobile means we're authenticated
|
|
@@ -130,14 +137,6 @@ export const setTenantId = (val) => {
|
|
|
130
137
|
storage.setItem(LAST_TENANT_KEY, val)
|
|
131
138
|
}
|
|
132
139
|
|
|
133
|
-
export const setIsSignedIn = (val) => {
|
|
134
|
-
__isSignedIn = val
|
|
135
|
-
purgePendingSignedInStatusCallbacks() // IMPORTANT: call and purge all pending callbacks
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export const getIsSignedIn = () => __isSignedIn
|
|
139
|
-
|
|
140
|
-
|
|
141
140
|
export const waitForSignedInStatus = () => new Promise((resolve) => {
|
|
142
141
|
if (typeof __isSignedIn === "boolean") {
|
|
143
142
|
resolve(__isSignedIn)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.191.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"test": "../../node_modules/.bin/wireit"
|
|
6
6
|
},
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"build-firebase": {
|
|
22
22
|
"command": "webpack -c firebase/webpack.config.js",
|
|
23
|
+
"dependencies": [
|
|
24
|
+
"install"
|
|
25
|
+
],
|
|
23
26
|
"files": [
|
|
24
27
|
"firebase/entry*.js",
|
|
25
28
|
"firebase/webpack.config.js"
|