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