@quatrain/auth 1.2.10 → 1.2.11

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.
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -44,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
11
  Object.defineProperty(exports, "__esModule", { value: true });
45
12
  exports.AbstractOAuthAdapter = void 0;
46
13
  const AbstractAuthAdapter_1 = require("./AbstractAuthAdapter");
47
- const nativeFetch = __importStar(require("node-fetch-native"));
48
14
  /**
49
15
  * Abstract class summarizing typical OAuth2 Web Application Flows.
50
16
  * Extend this to implement providers like GitHub, GitLab, Google, etc.
@@ -103,7 +69,7 @@ class AbstractOAuthAdapter extends AbstractAuthAdapter_1.AbstractAuthAdapter {
103
69
  if (redirectUri) {
104
70
  body.redirect_uri = redirectUri;
105
71
  }
106
- const response = yield nativeFetch.fetch(this._tokenEndpoint, {
72
+ const response = yield fetch(this._tokenEndpoint, {
107
73
  method: 'POST',
108
74
  headers: {
109
75
  'Content-Type': 'application/json',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/auth",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "license": "AGPL-3.0-only",
5
5
  "description": "Auth adapters commons",
6
6
  "main": "dist/index.js",
@@ -1,7 +1,6 @@
1
1
  import { AbstractAuthAdapter } from './AbstractAuthAdapter'
2
2
  import { AuthParameters } from './Auth'
3
3
  import { User } from '@quatrain/backend'
4
- import * as nativeFetch from 'node-fetch-native'
5
4
 
6
5
  /**
7
6
  * Abstract class summarizing typical OAuth2 Web Application Flows.
@@ -69,7 +68,7 @@ export abstract class AbstractOAuthAdapter extends AbstractAuthAdapter {
69
68
  body.redirect_uri = redirectUri
70
69
  }
71
70
 
72
- const response = await nativeFetch.fetch(this._tokenEndpoint, {
71
+ const response = await fetch(this._tokenEndpoint, {
73
72
  method: 'POST',
74
73
  headers: {
75
74
  'Content-Type': 'application/json',