@quatrain/auth 1.2.11 → 1.2.12

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.
@@ -80,7 +80,7 @@ class AbstractOAuthAdapter extends AbstractAuthAdapter_1.AbstractAuthAdapter {
80
80
  if (!response.ok) {
81
81
  throw new Error(`[${this.constructor.name}] OAuth token exchange failed: ${response.statusText}`);
82
82
  }
83
- const data = yield response.json();
83
+ const data = (yield response.json());
84
84
  if (data.error) {
85
85
  throw new Error(`[${this.constructor.name}] OAuth error: ${data.error_description || data.error}`);
86
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/auth",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "license": "AGPL-3.0-only",
5
5
  "description": "Auth adapters commons",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@quatrain/api": "^1.1.7",
24
24
  "@quatrain/backend": "^1.2.17",
25
- "@quatrain/core": "^1.2.17",
25
+ "@quatrain/core": "^1.2.18",
26
26
  "@quatrain/http": "^1.0.4"
27
27
  },
28
28
  "devDependencies": {
@@ -81,7 +81,7 @@ export abstract class AbstractOAuthAdapter extends AbstractAuthAdapter {
81
81
  throw new Error(`[${this.constructor.name}] OAuth token exchange failed: ${response.statusText}`)
82
82
  }
83
83
 
84
- const data = await response.json()
84
+ const data = (await response.json()) as Record<string, string | undefined>
85
85
  if (data.error) {
86
86
  throw new Error(`[${this.constructor.name}] OAuth error: ${data.error_description || data.error}`)
87
87
  }