@kubun/provider-google 0.10.0 → 0.11.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 +20 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
export function createGoogleProvider(
|
|
1
|
+
export function createGoogleProvider(params) {
|
|
2
|
+
if (!params.clientID) {
|
|
3
|
+
throw new Error('Google provider requires a non-empty clientID');
|
|
4
|
+
}
|
|
5
|
+
if (!params.clientSecret) {
|
|
6
|
+
throw new Error('Google provider requires a non-empty clientSecret');
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
name: 'google',
|
|
10
|
+
authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
11
|
+
tokenEndpoint: 'https://oauth2.googleapis.com/token',
|
|
12
|
+
baseScopes: [
|
|
13
|
+
'openid',
|
|
14
|
+
'profile',
|
|
15
|
+
'email'
|
|
16
|
+
],
|
|
17
|
+
clientID: params.clientID,
|
|
18
|
+
clientSecret: params.clientSecret
|
|
19
|
+
};
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/provider-google",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "see LICENSE.md",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"type": "module",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
],
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@kubun/connector": "^0.
|
|
18
|
+
"@kubun/connector": "^0.11.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build:clean": "del lib",
|
|
22
|
-
"build:js": "swc src -d ./lib --config-file ../../swc.json --strip-leading-paths",
|
|
22
|
+
"build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
23
23
|
"build:types": "tsc --emitDeclarationOnly --skipLibCheck",
|
|
24
24
|
"build:types:ci": "tsc --emitDeclarationOnly --declarationMap false",
|
|
25
25
|
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|