@steedos/service-identity-jwt 2.6.1-beta.6 → 2.6.2-beta.10
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.
|
@@ -27,7 +27,8 @@ class Account {
|
|
|
27
27
|
let phone_logout_other_clients = false;
|
|
28
28
|
let phone_login_expiration_in_days = null;
|
|
29
29
|
let space = null;
|
|
30
|
-
const
|
|
30
|
+
const accountsServer = yield (0, accounts_1.getAccountsServer)();
|
|
31
|
+
const userProfile = yield accountsServer.getUserProfile(user.id);
|
|
31
32
|
if (userProfile) {
|
|
32
33
|
logout_other_clients = userProfile.logout_other_clients || false;
|
|
33
34
|
login_expiration_in_days = userProfile.login_expiration_in_days;
|
|
@@ -37,7 +38,7 @@ class Account {
|
|
|
37
38
|
userProfile.phone_login_expiration_in_days;
|
|
38
39
|
space = userProfile.space;
|
|
39
40
|
}
|
|
40
|
-
const loginResult = yield
|
|
41
|
+
const loginResult = yield accountsServer.loginWithUser(user, Object.assign({}, {
|
|
41
42
|
ip,
|
|
42
43
|
userAgent
|
|
43
44
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-identity-jwt",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2-beta.10",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"steedos"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"description": "steedos package",
|
|
12
12
|
"repository": {},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@steedos/accounts": "2.6.
|
|
14
|
+
"@steedos/accounts": "2.6.2-beta.10",
|
|
15
15
|
"express": "4.18.1",
|
|
16
16
|
"jsonwebtoken": "8.5.1",
|
|
17
17
|
"passport": "^0.6.0",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "afbd1c34d1516e44494b5d5a192bbce80e48af93"
|
|
26
26
|
}
|
package/src/routes/account.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @LastEditTime: 2022-07-18 13:30:25
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { getAccountsServer, setAuthCookies } from '@steedos/accounts';
|
|
9
9
|
|
|
10
10
|
import * as requestIp from 'request-ip';
|
|
11
11
|
|
|
@@ -36,6 +36,7 @@ export class Account {
|
|
|
36
36
|
let phone_login_expiration_in_days = null;
|
|
37
37
|
let space = null;
|
|
38
38
|
// 获取用户简档
|
|
39
|
+
const accountsServer = await getAccountsServer();
|
|
39
40
|
const userProfile = await accountsServer.getUserProfile(
|
|
40
41
|
user.id
|
|
41
42
|
);
|