@logto/js 0.1.11 → 0.1.14
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/core/user-info.d.ts +4 -0
- package/lib/utils/scopes.js +1 -1
- package/package.json +3 -3
package/lib/core/user-info.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Requester } from '../utils';
|
|
2
2
|
export declare type UserInfoResponse = {
|
|
3
3
|
sub: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
role_names?: string[];
|
|
4
8
|
};
|
|
5
9
|
export declare const fetchUserInfo: (userInfoEndpoint: string, accessToken: string, requester: Requester) => Promise<UserInfoResponse>;
|
package/lib/utils/scopes.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.withReservedScopes = void 0;
|
|
|
6
6
|
* @return scopes should contain all reserved scopes ( Logto requires `openid` and `offline_access` )
|
|
7
7
|
*/
|
|
8
8
|
const withReservedScopes = (originalScopes) => {
|
|
9
|
-
const uniqueScopes = new Set(['openid', 'offline_access', ...(originalScopes ?? [])]);
|
|
9
|
+
const uniqueScopes = new Set(['openid', 'offline_access', 'profile', ...(originalScopes ?? [])]);
|
|
10
10
|
return Array.from(uniqueScopes).join(' ');
|
|
11
11
|
};
|
|
12
12
|
exports.withReservedScopes = withReservedScopes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"exports": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"eslint": "^8.9.0",
|
|
43
43
|
"jest": "^27.5.1",
|
|
44
44
|
"jest-matcher-specific-error": "^1.0.0",
|
|
45
|
-
"lint-staged": "^
|
|
45
|
+
"lint-staged": "^13.0.0",
|
|
46
46
|
"nock": "^13.1.3",
|
|
47
47
|
"node-fetch": "^2.6.7",
|
|
48
48
|
"prettier": "^2.3.2",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "5d05c6bd23dc35d7217031edccc01db2bae33b7b"
|
|
62
62
|
}
|