@capgo/capacitor-social-login 8.3.13 → 8.3.14

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/dist/plugin.js CHANGED
@@ -5,17 +5,40 @@ var capacitorCapacitorUpdater = (function (exports, core) {
5
5
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SocialLoginWeb()),
6
6
  });
7
7
 
8
- var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
9
- var t = {};
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
11
- t[p] = s[p];
12
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
13
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
14
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
15
- t[p[i]] = s[p[i]];
16
- }
17
- return t;
8
+ /******************************************************************************
9
+ Copyright (c) Microsoft Corporation.
10
+
11
+ Permission to use, copy, modify, and/or distribute this software for any
12
+ purpose with or without fee is hereby granted.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
+ PERFORMANCE OF THIS SOFTWARE.
21
+ ***************************************************************************** */
22
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
23
+
24
+
25
+ function __rest(s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ }
36
+
37
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
38
+ var e = new Error(message);
39
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
18
40
  };
41
+
19
42
  const AUTH_CONNECT_PROVIDERS = ['auth0', 'azure', 'cognito', 'okta', 'onelogin'];
20
43
  const DEFAULT_SCOPES = {
21
44
  auth0: 'openid profile email offline_access',
@@ -195,7 +218,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
195
218
  };
196
219
  const createAuthConnectClient = (client) => ({
197
220
  initialize: async (options) => {
198
- const { authConnect, oauth2 } = options, rest = __rest$2(options, ["authConnect", "oauth2"]);
221
+ const { authConnect, oauth2 } = options, rest = __rest(options, ["authConnect", "oauth2"]);
199
222
  const presetProviders = buildAuthConnectProviders(authConnect);
200
223
  const mergedOauth2 = mergeOAuth2Configs(presetProviders, oauth2);
201
224
  const payload = Object.assign(Object.assign({}, rest), (mergedOauth2 ? { oauth2: mergedOauth2 } : {}));
@@ -881,17 +904,6 @@ var capacitorCapacitorUpdater = (function (exports, core) {
881
904
  }
882
905
  }
883
906
 
884
- var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
885
- var t = {};
886
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
887
- t[p] = s[p];
888
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
889
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
890
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
891
- t[p[i]] = s[p[i]];
892
- }
893
- return t;
894
- };
895
907
  /**
896
908
  * OAuth2 Social Login Manager
897
909
  * Supports multiple OAuth2 provider configurations
@@ -1119,7 +1131,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
1119
1131
  }
1120
1132
  cleanup(messageHandler, timeoutHandle, popupClosedInterval);
1121
1133
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1122
- const _a = data, { provider: _ignoredProvider, type: _ignoredType } = _a, payload = __rest$1(_a, ["provider", "type"]);
1134
+ const _a = data, { provider: _ignoredProvider, type: _ignoredType } = _a, payload = __rest(_a, ["provider", "type"]);
1123
1135
  resolve({
1124
1136
  provider: 'oauth2',
1125
1137
  result: payload,
@@ -1554,17 +1566,6 @@ var capacitorCapacitorUpdater = (function (exports, core) {
1554
1566
  }
1555
1567
  }
1556
1568
 
1557
- var __rest = (undefined && undefined.__rest) || function (s, e) {
1558
- var t = {};
1559
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1560
- t[p] = s[p];
1561
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1562
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1563
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1564
- t[p[i]] = s[p[i]];
1565
- }
1566
- return t;
1567
- };
1568
1569
  class TwitterSocialLogin extends BaseSocialLogin {
1569
1570
  constructor() {
1570
1571
  super(...arguments);