@logto/connector-google 1.1.1 → 1.3.0
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/index.js +3 -1
- package/package.json +5 -6
package/lib/index.js
CHANGED
|
@@ -153,7 +153,8 @@ const getUserInfo = (getConfig) => async (data) => {
|
|
|
153
153
|
},
|
|
154
154
|
timeout: { request: defaultTimeout },
|
|
155
155
|
});
|
|
156
|
-
const
|
|
156
|
+
const rawData = parseJson(httpResponse.body);
|
|
157
|
+
const result = userInfoResponseGuard.safeParse(rawData);
|
|
157
158
|
if (!result.success) {
|
|
158
159
|
throw new ConnectorError(ConnectorErrorCodes.InvalidResponse, result.error);
|
|
159
160
|
}
|
|
@@ -163,6 +164,7 @@ const getUserInfo = (getConfig) => async (data) => {
|
|
|
163
164
|
avatar,
|
|
164
165
|
email: conditional(email_verified && email),
|
|
165
166
|
name,
|
|
167
|
+
rawData,
|
|
166
168
|
};
|
|
167
169
|
}
|
|
168
170
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/connector-google",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Google web connector implementation.",
|
|
5
5
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@logto/connector-kit": "^
|
|
7
|
+
"@logto/connector-kit": "^3.0.0"
|
|
8
8
|
},
|
|
9
9
|
"main": "./lib/index.js",
|
|
10
10
|
"module": "./lib/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"logo-dark.svg"
|
|
19
19
|
],
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": "^
|
|
21
|
+
"node": "^20.9.0"
|
|
22
22
|
},
|
|
23
23
|
"eslintConfig": {
|
|
24
24
|
"extends": "@silverhand",
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
|
44
44
|
"lint": "eslint --ext .ts src",
|
|
45
45
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
46
|
-
"test
|
|
47
|
-
"test": "pnpm
|
|
48
|
-
"test:ci": "pnpm test:only --silent --coverage"
|
|
46
|
+
"test": "vitest src",
|
|
47
|
+
"test:ci": "pnpm run test --silent --coverage"
|
|
49
48
|
}
|
|
50
49
|
}
|