@live-change/google-authentication-service 0.9.18 → 0.9.20
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/connect.js +7 -1
- package/package.json +4 -4
package/connect.js
CHANGED
|
@@ -74,8 +74,14 @@ definition.trigger({
|
|
|
74
74
|
if(!accountData) throw 'notFound'
|
|
75
75
|
const { user } = accountData
|
|
76
76
|
|
|
77
|
+
let offlineAccess
|
|
78
|
+
const userAccounts = await Account.indexRangeGet('byUser', user)
|
|
77
79
|
console.log("GET OFFLINE ACCESS!", account, user)
|
|
78
|
-
|
|
80
|
+
if(userAccounts.length === 1) {
|
|
81
|
+
offlineAccess = await OfflineAccess.indexObjectGet('byUser', [user])
|
|
82
|
+
} else {
|
|
83
|
+
offlineAccess = await OfflineAccess.indexObjectGet('byUserAccount', [user, account])
|
|
84
|
+
}
|
|
79
85
|
console.log("OFFLINE ACCESS", offlineAccess)
|
|
80
86
|
if(offlineAccess) {
|
|
81
87
|
await triggerService({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/google-authentication-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "^0.9.
|
|
25
|
-
"@live-change/relations-plugin": "^0.9.
|
|
24
|
+
"@live-change/framework": "^0.9.20",
|
|
25
|
+
"@live-change/relations-plugin": "^0.9.20",
|
|
26
26
|
"google-auth-library": "9.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "6524c2dedbb137e95e9aa07eaf9503d68d7b9093",
|
|
29
29
|
"type": "module"
|
|
30
30
|
}
|