@abtnode/core 1.16.14-beta-ab7f615e → 1.16.14-beta-cb53c14b
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/lib/states/user.js +16 -2
- package/package.json +19 -19
package/lib/states/user.js
CHANGED
|
@@ -78,7 +78,14 @@ class User extends ExtendBase {
|
|
|
78
78
|
// create passports and connectedAccounts
|
|
79
79
|
await Promise.all((get(user, 'passports') || []).map((x) => this.passport.insert({ ...x, userDid: user.did })));
|
|
80
80
|
await Promise.all(
|
|
81
|
-
(get(user, 'connectedAccounts') || []).map((x) =>
|
|
81
|
+
(get(user, 'connectedAccounts') || []).map((x) => {
|
|
82
|
+
// FIXME: @zhanghan 这里在修复完 https://github.com/blocklet/tweet-token/issues/131 之后需要去除特殊处理的逻辑
|
|
83
|
+
const mergeData = { ...x, userDid: user.did };
|
|
84
|
+
if (mergeData.id === null && mergeData.provider === LOGIN_PROVIDER.AUTH0) {
|
|
85
|
+
mergeData.provider = LOGIN_PROVIDER.WALLET;
|
|
86
|
+
}
|
|
87
|
+
return this.connectedAccount.insert(mergeData);
|
|
88
|
+
})
|
|
82
89
|
);
|
|
83
90
|
|
|
84
91
|
return this.getUser(user.did);
|
|
@@ -100,7 +107,14 @@ class User extends ExtendBase {
|
|
|
100
107
|
await Promise.all(
|
|
101
108
|
(get(updates, 'connectedAccounts') || [])
|
|
102
109
|
.filter((x) => x.did)
|
|
103
|
-
.map((x) =>
|
|
110
|
+
.map((x) => {
|
|
111
|
+
// FIXME: @zhanghan 这里在修复完 https://github.com/blocklet/tweet-token/issues/131 之后需要去除特殊处理的逻辑
|
|
112
|
+
const mergeData = { ...x, userDid: did };
|
|
113
|
+
if (mergeData.id === null && mergeData.provider === LOGIN_PROVIDER.AUTH0) {
|
|
114
|
+
mergeData.provider = LOGIN_PROVIDER.WALLET;
|
|
115
|
+
}
|
|
116
|
+
return this.connectedAccount.upsert({ did: x.did }, mergeData);
|
|
117
|
+
})
|
|
104
118
|
);
|
|
105
119
|
|
|
106
120
|
return this.getUser(did);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.14-beta-
|
|
6
|
+
"version": "1.16.14-beta-cb53c14b",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.14-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.14-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.14-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.14-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.14-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.14-beta-
|
|
28
|
-
"@abtnode/models": "1.16.14-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.14-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.14-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.14-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.14-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.14-beta-
|
|
34
|
-
"@abtnode/util": "1.16.14-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.14-beta-cb53c14b",
|
|
23
|
+
"@abtnode/auth": "1.16.14-beta-cb53c14b",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.14-beta-cb53c14b",
|
|
25
|
+
"@abtnode/constant": "1.16.14-beta-cb53c14b",
|
|
26
|
+
"@abtnode/cron": "1.16.14-beta-cb53c14b",
|
|
27
|
+
"@abtnode/logger": "1.16.14-beta-cb53c14b",
|
|
28
|
+
"@abtnode/models": "1.16.14-beta-cb53c14b",
|
|
29
|
+
"@abtnode/queue": "1.16.14-beta-cb53c14b",
|
|
30
|
+
"@abtnode/rbac": "1.16.14-beta-cb53c14b",
|
|
31
|
+
"@abtnode/router-provider": "1.16.14-beta-cb53c14b",
|
|
32
|
+
"@abtnode/static-server": "1.16.14-beta-cb53c14b",
|
|
33
|
+
"@abtnode/timemachine": "1.16.14-beta-cb53c14b",
|
|
34
|
+
"@abtnode/util": "1.16.14-beta-cb53c14b",
|
|
35
35
|
"@arcblock/did": "1.18.88",
|
|
36
36
|
"@arcblock/did-auth": "1.18.88",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.88",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.88",
|
|
44
44
|
"@arcblock/vc": "1.18.88",
|
|
45
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
46
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
47
|
-
"@blocklet/resolver": "1.16.14-beta-
|
|
48
|
-
"@blocklet/sdk": "1.16.14-beta-
|
|
45
|
+
"@blocklet/constant": "1.16.14-beta-cb53c14b",
|
|
46
|
+
"@blocklet/meta": "1.16.14-beta-cb53c14b",
|
|
47
|
+
"@blocklet/resolver": "1.16.14-beta-cb53c14b",
|
|
48
|
+
"@blocklet/sdk": "1.16.14-beta-cb53c14b",
|
|
49
49
|
"@did-space/client": "^0.2.141",
|
|
50
50
|
"@fidm/x509": "^1.2.1",
|
|
51
51
|
"@ocap/mcrypto": "1.18.88",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"jest": "^27.5.1",
|
|
99
99
|
"unzipper": "^0.10.11"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "3dcea777b632f9236c10ca888db63c7282992c56"
|
|
102
102
|
}
|