@live-change/google-authentication-service 0.9.3 → 0.9.4
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/config.js +17 -0
- package/googleClient.js +3 -3
- package/package.json +4 -4
package/config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
import definition from './definition.js'
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
clientId = process.env.GOOGLE_CLIENT_ID,
|
|
7
|
+
clientSecret = process.env.GOOGLE_CLIENT_SECRET
|
|
8
|
+
} = definition.config
|
|
9
|
+
|
|
10
|
+
definition.clientConfig = {
|
|
11
|
+
clientId
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
clientId,
|
|
16
|
+
clientSecret
|
|
17
|
+
}
|
package/googleClient.js
CHANGED
|
@@ -7,10 +7,10 @@ const debug = Debug('services:googleAuthentication')
|
|
|
7
7
|
|
|
8
8
|
import axios from 'axios'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import config from './config.js'
|
|
11
11
|
|
|
12
|
-
const googleClientId = config.clientId
|
|
13
|
-
const googleClientSecret = config.
|
|
12
|
+
const googleClientId = config.clientId
|
|
13
|
+
const googleClientSecret = config.clientSecret
|
|
14
14
|
export { googleClientId, googleClientSecret }
|
|
15
15
|
|
|
16
16
|
export async function getTokensWithCode(code, redirectUri) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/google-authentication-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "^0.9.
|
|
25
|
-
"@live-change/relations-plugin": "^0.9.
|
|
24
|
+
"@live-change/framework": "^0.9.4",
|
|
25
|
+
"@live-change/relations-plugin": "^0.9.4",
|
|
26
26
|
"google-auth-library": "9.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "98fd51a1a5fea3ff8adff3662ef1e4a00774eed6",
|
|
29
29
|
"type": "module"
|
|
30
30
|
}
|