@abtnode/blocklet-services 1.16.11-next-6f30b7db → 1.16.11-next-73f5f388
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/api/routes/user.js +4 -14
- package/package.json +17 -17
package/api/routes/user.js
CHANGED
|
@@ -77,10 +77,7 @@ async function composeProfileData({ avatar, fullName, email }, { node, req, team
|
|
|
77
77
|
return profile;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
async function loginWallet(
|
|
81
|
-
{ did, pk, avatar, email, fullName },
|
|
82
|
-
{ node, req, locale, componentId, teamDid, blockletWallet }
|
|
83
|
-
) {
|
|
80
|
+
async function loginWallet({ did, pk, avatar, email, fullName }, { node, req, locale, componentId, teamDid }) {
|
|
84
81
|
const provider = 'wallet';
|
|
85
82
|
const { error } = loginWalletSchema.validate({
|
|
86
83
|
provider,
|
|
@@ -101,8 +98,6 @@ async function loginWallet(
|
|
|
101
98
|
},
|
|
102
99
|
options: {
|
|
103
100
|
enableConnectedAccount: true,
|
|
104
|
-
enableNormalize: true,
|
|
105
|
-
blockletSk: blockletWallet.secretKey,
|
|
106
101
|
},
|
|
107
102
|
});
|
|
108
103
|
|
|
@@ -119,8 +114,8 @@ async function loginWallet(
|
|
|
119
114
|
const doc = await node.loginUser({
|
|
120
115
|
teamDid,
|
|
121
116
|
user: {
|
|
122
|
-
did: currentUser?.did ||
|
|
123
|
-
pk: currentUser?.pk ||
|
|
117
|
+
did: currentUser?.did || did,
|
|
118
|
+
pk: currentUser?.pk || pk,
|
|
124
119
|
locale,
|
|
125
120
|
lastLoginIp,
|
|
126
121
|
connectedAccount: { provider, did, pk },
|
|
@@ -157,8 +152,6 @@ async function loginOAuth(
|
|
|
157
152
|
},
|
|
158
153
|
options: {
|
|
159
154
|
enableConnectedAccount: true,
|
|
160
|
-
enableNormalize: true,
|
|
161
|
-
blockletSk: blockletWallet.secretKey,
|
|
162
155
|
},
|
|
163
156
|
});
|
|
164
157
|
|
|
@@ -198,10 +191,7 @@ async function login(req, node, options) {
|
|
|
198
191
|
|
|
199
192
|
let doc;
|
|
200
193
|
if (provider === 'wallet') {
|
|
201
|
-
doc = await loginWallet(
|
|
202
|
-
{ did, pk, avatar, email, fullName },
|
|
203
|
-
{ node, req, locale, componentId, teamDid, blockletWallet }
|
|
204
|
-
);
|
|
194
|
+
doc = await loginWallet({ did, pk, avatar, email, fullName }, { node, req, locale, componentId, teamDid });
|
|
205
195
|
} else {
|
|
206
196
|
doc = await loginOAuth(
|
|
207
197
|
{ provider, id, avatar, email, fullName },
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.11-next-
|
|
6
|
+
"version": "1.16.11-next-73f5f388",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@abtnode/auth": "1.16.11-next-
|
|
37
|
-
"@abtnode/client": "1.16.11-next-
|
|
38
|
-
"@abtnode/connect-storage": "1.16.11-next-
|
|
39
|
-
"@abtnode/constant": "1.16.11-next-
|
|
40
|
-
"@abtnode/core": "1.16.11-next-
|
|
41
|
-
"@abtnode/cron": "1.16.11-next-
|
|
42
|
-
"@abtnode/logger": "1.16.11-next-
|
|
43
|
-
"@abtnode/models": "1.16.11-next-
|
|
44
|
-
"@abtnode/router-adapter": "1.16.11-next-
|
|
45
|
-
"@abtnode/router-templates": "1.16.11-next-
|
|
46
|
-
"@abtnode/util": "1.16.11-next-
|
|
36
|
+
"@abtnode/auth": "1.16.11-next-73f5f388",
|
|
37
|
+
"@abtnode/client": "1.16.11-next-73f5f388",
|
|
38
|
+
"@abtnode/connect-storage": "1.16.11-next-73f5f388",
|
|
39
|
+
"@abtnode/constant": "1.16.11-next-73f5f388",
|
|
40
|
+
"@abtnode/core": "1.16.11-next-73f5f388",
|
|
41
|
+
"@abtnode/cron": "1.16.11-next-73f5f388",
|
|
42
|
+
"@abtnode/logger": "1.16.11-next-73f5f388",
|
|
43
|
+
"@abtnode/models": "1.16.11-next-73f5f388",
|
|
44
|
+
"@abtnode/router-adapter": "1.16.11-next-73f5f388",
|
|
45
|
+
"@abtnode/router-templates": "1.16.11-next-73f5f388",
|
|
46
|
+
"@abtnode/util": "1.16.11-next-73f5f388",
|
|
47
47
|
"@arcblock/did": "^1.18.80",
|
|
48
48
|
"@arcblock/did-auth": "1.18.80",
|
|
49
49
|
"@arcblock/did-ext": "^1.18.80",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@arcblock/jwt": "1.18.80",
|
|
53
53
|
"@arcblock/validator": "^1.18.80",
|
|
54
54
|
"@arcblock/ws": "1.18.80",
|
|
55
|
-
"@blocklet/constant": "1.16.11-next-
|
|
55
|
+
"@blocklet/constant": "1.16.11-next-73f5f388",
|
|
56
56
|
"@blocklet/form-builder": "^0.1.11",
|
|
57
57
|
"@blocklet/form-collector": "^0.1.6",
|
|
58
|
-
"@blocklet/meta": "1.16.11-next-
|
|
59
|
-
"@blocklet/sdk": "1.16.11-next-
|
|
58
|
+
"@blocklet/meta": "1.16.11-next-73f5f388",
|
|
59
|
+
"@blocklet/sdk": "1.16.11-next-73f5f388",
|
|
60
60
|
"@did-connect/authenticator": "^2.1.59",
|
|
61
61
|
"@did-connect/relay-adapter-express": "^2.1.59",
|
|
62
62
|
"@did-connect/storage-nedb": "^2.1.59",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@nedb/core": "^2.1.2"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@abtnode/ux": "1.16.11-next-
|
|
96
|
+
"@abtnode/ux": "1.16.11-next-73f5f388",
|
|
97
97
|
"@arcblock/did-connect": "^2.5.48",
|
|
98
98
|
"@arcblock/icons": "^2.5.48",
|
|
99
99
|
"@arcblock/ux": "^2.5.48",
|
|
@@ -161,5 +161,5 @@
|
|
|
161
161
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
162
162
|
"email": "shijun@arcblock.io"
|
|
163
163
|
},
|
|
164
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "0f77a5958181b871bc285eeeda1eade9a5c1f231"
|
|
165
165
|
}
|