@logto/connector-google 1.2.0 → 1.4.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/README.md +25 -19
- package/lib/constant.d.ts +1 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.js +1222 -22
- package/lib/types.d.ts +11 -14
- package/package.json +29 -5
package/lib/types.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const googleConfigGuard: z.ZodObject<{
|
|
3
|
-
clientId: z.ZodString;
|
|
4
|
-
clientSecret: z.ZodString;
|
|
5
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
clientId: string;
|
|
8
|
-
clientSecret: string;
|
|
9
|
-
scope?: string | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
clientId: string;
|
|
12
|
-
clientSecret: string;
|
|
13
|
-
scope?: string | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
export type GoogleConfig = z.infer<typeof googleConfigGuard>;
|
|
16
2
|
export declare const accessTokenResponseGuard: z.ZodObject<{
|
|
17
3
|
access_token: z.ZodString;
|
|
18
4
|
scope: z.ZodString;
|
|
@@ -66,3 +52,14 @@ export declare const authResponseGuard: z.ZodObject<{
|
|
|
66
52
|
code: string;
|
|
67
53
|
redirectUri: string;
|
|
68
54
|
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Response payload from Google One Tap. Note the CSRF token is not included since it should be
|
|
57
|
+
* verified by the web server.
|
|
58
|
+
*/
|
|
59
|
+
export declare const googleOneTapDataGuard: z.ZodObject<{
|
|
60
|
+
credential: z.ZodString;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
credential: string;
|
|
63
|
+
}, {
|
|
64
|
+
credential: string;
|
|
65
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/connector-google",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.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": "^4.0.0",
|
|
8
|
+
"@silverhand/essentials": "^2.9.1",
|
|
9
|
+
"got": "^14.0.0",
|
|
10
|
+
"jose": "^5.0.0",
|
|
11
|
+
"snakecase-keys": "^8.0.0",
|
|
12
|
+
"zod": "^3.22.4"
|
|
8
13
|
},
|
|
9
14
|
"main": "./lib/index.js",
|
|
10
15
|
"module": "./lib/index.js",
|
|
@@ -36,6 +41,26 @@
|
|
|
36
41
|
"publishConfig": {
|
|
37
42
|
"access": "public"
|
|
38
43
|
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rollup/plugin-commonjs": "^26.0.0",
|
|
46
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
48
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
49
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
50
|
+
"@silverhand/ts-config": "6.0.0",
|
|
51
|
+
"@types/node": "^20.11.20",
|
|
52
|
+
"@types/supertest": "^6.0.2",
|
|
53
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
54
|
+
"eslint": "^8.56.0",
|
|
55
|
+
"lint-staged": "^15.0.2",
|
|
56
|
+
"nock": "^13.3.1",
|
|
57
|
+
"prettier": "^3.0.0",
|
|
58
|
+
"rollup": "^4.12.0",
|
|
59
|
+
"rollup-plugin-output-size": "^1.3.0",
|
|
60
|
+
"supertest": "^7.0.0",
|
|
61
|
+
"typescript": "^5.3.3",
|
|
62
|
+
"vitest": "^1.4.0"
|
|
63
|
+
},
|
|
39
64
|
"scripts": {
|
|
40
65
|
"precommit": "lint-staged",
|
|
41
66
|
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
|
@@ -43,8 +68,7 @@
|
|
|
43
68
|
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
|
44
69
|
"lint": "eslint --ext .ts src",
|
|
45
70
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
46
|
-
"test
|
|
47
|
-
"test": "pnpm
|
|
48
|
-
"test:ci": "pnpm test:only --silent --coverage"
|
|
71
|
+
"test": "vitest src",
|
|
72
|
+
"test:ci": "pnpm run test --silent --coverage"
|
|
49
73
|
}
|
|
50
74
|
}
|