@live-change/google-authentication-service 0.9.3 → 0.9.5

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 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
- const config = definition.config
10
+ import config from './config.js'
11
11
 
12
- const googleClientId = config.clientId || process.env.GOOGLE_CLIENT_ID
13
- const googleClientSecret = config.clientId || process.env.GOOGLE_CLIENT_SECRET
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",
3
+ "version": "0.9.5",
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.3",
25
- "@live-change/relations-plugin": "^0.9.3",
24
+ "@live-change/framework": "^0.9.5",
25
+ "@live-change/relations-plugin": "^0.9.5",
26
26
  "google-auth-library": "9.0.0"
27
27
  },
28
- "gitHead": "79f98e67cb1a52a38ced5deb20b0d62d395313cb",
28
+ "gitHead": "59f1d66de3a64b751308593e282e8635c0ecab7e",
29
29
  "type": "module"
30
30
  }