@firebase/auth 0.20.11 → 0.21.0-canary.37f31c57b
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/CHANGELOG.md +15 -0
- package/dist/cordova/index.js +3 -3
- package/dist/cordova/index.js.map +1 -1
- package/dist/cordova/internal.js +62 -63
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-41041153.js → popup_redirect-b88a35be.js} +508 -516
- package/dist/cordova/{popup_redirect-41041153.js.map → popup_redirect-b88a35be.js.map} +1 -1
- package/dist/esm2017/{index-0bb4da3b.js → index-d02db7df.js} +477 -484
- package/dist/esm2017/{index-0bb4da3b.js.map → index-d02db7df.js.map} +1 -1
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +15 -15
- package/dist/esm2017/internal.js.map +1 -1
- package/dist/esm5/{index-697aab8a.js → index-207c263a.js} +554 -563
- package/dist/esm5/{index-697aab8a.js.map → index-207c263a.js.map} +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +16 -16
- package/dist/esm5/internal.js.map +1 -1
- package/dist/index.webworker.esm5.js +455 -463
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-a6537a51.js → index-eb97f907.js} +438 -446
- package/dist/node/{index-a6537a51.js.map → index-eb97f907.js.map} +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +46 -46
- package/dist/node/internal.js.map +1 -1
- package/dist/node-esm/{index-3246d34e.js → index-48d368bc.js} +374 -381
- package/dist/node-esm/{index-3246d34e.js.map → index-48d368bc.js.map} +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +44 -44
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/rn/index.js +3 -3
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +97 -98
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-5340e476.js → phone-dfc452bc.js} +472 -480
- package/dist/rn/{phone-5340e476.js.map → phone-dfc452bc.js.map} +1 -1
- package/package.json +9 -9
package/dist/node/index.js
CHANGED
package/dist/node/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-eb97f907.js');
|
|
6
6
|
var tslib = require('tslib');
|
|
7
7
|
var util = require('@firebase/util');
|
|
8
8
|
var app = require('@firebase/app');
|
|
@@ -93,7 +93,7 @@ function _withDefaultResolver(auth, resolverOverride) {
|
|
|
93
93
|
if (resolverOverride) {
|
|
94
94
|
return index._getInstance(resolverOverride);
|
|
95
95
|
}
|
|
96
|
-
index._assert(auth._popupRedirectResolver, auth, "argument-error" /* ARGUMENT_ERROR */);
|
|
96
|
+
index._assert(auth._popupRedirectResolver, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
|
|
97
97
|
return auth._popupRedirectResolver;
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -116,7 +116,7 @@ function _withDefaultResolver(auth, resolverOverride) {
|
|
|
116
116
|
var IdpCredential = /** @class */ (function (_super) {
|
|
117
117
|
tslib.__extends(IdpCredential, _super);
|
|
118
118
|
function IdpCredential(params) {
|
|
119
|
-
var _this = _super.call(this, "custom" /* CUSTOM */, "custom" /* CUSTOM */) || this;
|
|
119
|
+
var _this = _super.call(this, "custom" /* ProviderId.CUSTOM */, "custom" /* ProviderId.CUSTOM */) || this;
|
|
120
120
|
_this.params = params;
|
|
121
121
|
return _this;
|
|
122
122
|
}
|
|
@@ -151,7 +151,7 @@ function _signIn(params) {
|
|
|
151
151
|
}
|
|
152
152
|
function _reauth(params) {
|
|
153
153
|
var auth = params.auth, user = params.user;
|
|
154
|
-
index._assert(user, auth, "internal-error" /* INTERNAL_ERROR */);
|
|
154
|
+
index._assert(user, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
155
155
|
return index._reauthenticate(user, new IdpCredential(params), params.bypassAuthState);
|
|
156
156
|
}
|
|
157
157
|
function _link(params) {
|
|
@@ -159,7 +159,7 @@ function _link(params) {
|
|
|
159
159
|
var auth, user;
|
|
160
160
|
return tslib.__generator(this, function (_a) {
|
|
161
161
|
auth = params.auth, user = params.user;
|
|
162
|
-
index._assert(user, auth, "internal-error" /* INTERNAL_ERROR */);
|
|
162
|
+
index._assert(user, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
163
163
|
return [2 /*return*/, index._link(user, new IdpCredential(params), params.bypassAuthState)];
|
|
164
164
|
});
|
|
165
165
|
});
|
|
@@ -267,17 +267,17 @@ var AbstractPopupRedirectOperation = /** @class */ (function () {
|
|
|
267
267
|
};
|
|
268
268
|
AbstractPopupRedirectOperation.prototype.getIdpTask = function (type) {
|
|
269
269
|
switch (type) {
|
|
270
|
-
case "signInViaPopup" /* SIGN_IN_VIA_POPUP */:
|
|
271
|
-
case "signInViaRedirect" /* SIGN_IN_VIA_REDIRECT */:
|
|
270
|
+
case "signInViaPopup" /* AuthEventType.SIGN_IN_VIA_POPUP */:
|
|
271
|
+
case "signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:
|
|
272
272
|
return _signIn;
|
|
273
|
-
case "linkViaPopup" /* LINK_VIA_POPUP */:
|
|
274
|
-
case "linkViaRedirect" /* LINK_VIA_REDIRECT */:
|
|
273
|
+
case "linkViaPopup" /* AuthEventType.LINK_VIA_POPUP */:
|
|
274
|
+
case "linkViaRedirect" /* AuthEventType.LINK_VIA_REDIRECT */:
|
|
275
275
|
return _link;
|
|
276
|
-
case "reauthViaPopup" /* REAUTH_VIA_POPUP */:
|
|
277
|
-
case "reauthViaRedirect" /* REAUTH_VIA_REDIRECT */:
|
|
276
|
+
case "reauthViaPopup" /* AuthEventType.REAUTH_VIA_POPUP */:
|
|
277
|
+
case "reauthViaRedirect" /* AuthEventType.REAUTH_VIA_REDIRECT */:
|
|
278
278
|
return _reauth;
|
|
279
279
|
default:
|
|
280
|
-
index._fail(this.auth, "internal-error" /* INTERNAL_ERROR */);
|
|
280
|
+
index._fail(this.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
AbstractPopupRedirectOperation.prototype.resolve = function (cred) {
|
|
@@ -325,10 +325,10 @@ var RedirectAction = /** @class */ (function (_super) {
|
|
|
325
325
|
function RedirectAction(auth, resolver, bypassAuthState) {
|
|
326
326
|
if (bypassAuthState === void 0) { bypassAuthState = false; }
|
|
327
327
|
var _this = _super.call(this, auth, [
|
|
328
|
-
"signInViaRedirect" /* SIGN_IN_VIA_REDIRECT */,
|
|
329
|
-
"linkViaRedirect" /* LINK_VIA_REDIRECT */,
|
|
330
|
-
"reauthViaRedirect" /* REAUTH_VIA_REDIRECT */,
|
|
331
|
-
"unknown" /* UNKNOWN */
|
|
328
|
+
"signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */,
|
|
329
|
+
"linkViaRedirect" /* AuthEventType.LINK_VIA_REDIRECT */,
|
|
330
|
+
"reauthViaRedirect" /* AuthEventType.REAUTH_VIA_REDIRECT */,
|
|
331
|
+
"unknown" /* AuthEventType.UNKNOWN */
|
|
332
332
|
], resolver, undefined, bypassAuthState) || this;
|
|
333
333
|
_this.eventId = null;
|
|
334
334
|
return _this;
|
|
@@ -387,10 +387,10 @@ var RedirectAction = /** @class */ (function (_super) {
|
|
|
387
387
|
return tslib.__generator(this, function (_a) {
|
|
388
388
|
switch (_a.label) {
|
|
389
389
|
case 0:
|
|
390
|
-
if (event.type === "signInViaRedirect" /* SIGN_IN_VIA_REDIRECT */) {
|
|
390
|
+
if (event.type === "signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */) {
|
|
391
391
|
return [2 /*return*/, _super.prototype.onAuthEvent.call(this, event)];
|
|
392
392
|
}
|
|
393
|
-
else if (event.type === "unknown" /* UNKNOWN */) {
|
|
393
|
+
else if (event.type === "unknown" /* AuthEventType.UNKNOWN */) {
|
|
394
394
|
// This is a sentinel value indicating there's no pending redirect
|
|
395
395
|
this.resolve(null);
|
|
396
396
|
return [2 /*return*/];
|
|
@@ -581,7 +581,7 @@ var BrowserPersistenceClass = /** @class */ (function () {
|
|
|
581
581
|
var BrowserSessionPersistence = /** @class */ (function (_super) {
|
|
582
582
|
tslib.__extends(BrowserSessionPersistence, _super);
|
|
583
583
|
function BrowserSessionPersistence() {
|
|
584
|
-
return _super.call(this, function () { return window.sessionStorage; }, "SESSION" /* SESSION */) || this;
|
|
584
|
+
return _super.call(this, function () { return window.sessionStorage; }, "SESSION" /* PersistenceType.SESSION */) || this;
|
|
585
585
|
}
|
|
586
586
|
BrowserSessionPersistence.prototype._addListener = function (_key, _listener) {
|
|
587
587
|
// Listeners are not supported for session storage since it cannot be shared across windows
|
|
@@ -631,8 +631,8 @@ var WIDGET_PATH = '__/auth/handler';
|
|
|
631
631
|
*/
|
|
632
632
|
var EMULATOR_WIDGET_PATH = 'emulator/auth/handler';
|
|
633
633
|
function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additionalParams) {
|
|
634
|
-
index._assert(auth.config.authDomain, auth, "auth-domain-config-required" /* MISSING_AUTH_DOMAIN */);
|
|
635
|
-
index._assert(auth.config.apiKey, auth, "invalid-api-key" /* INVALID_API_KEY */);
|
|
634
|
+
index._assert(auth.config.authDomain, auth, "auth-domain-config-required" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);
|
|
635
|
+
index._assert(auth.config.apiKey, auth, "invalid-api-key" /* AuthErrorCode.INVALID_API_KEY */);
|
|
636
636
|
var params = {
|
|
637
637
|
apiKey: auth.config.apiKey,
|
|
638
638
|
appName: auth.name,
|
|
@@ -671,12 +671,12 @@ function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additio
|
|
|
671
671
|
delete paramsDict[key];
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
return getHandlerBase(auth)
|
|
674
|
+
return "".concat(getHandlerBase(auth), "?").concat(util.querystring(paramsDict).slice(1));
|
|
675
675
|
}
|
|
676
676
|
function getHandlerBase(_a) {
|
|
677
677
|
var config = _a.config;
|
|
678
678
|
if (!config.emulator) {
|
|
679
|
-
return "https://"
|
|
679
|
+
return "https://".concat(config.authDomain, "/").concat(WIDGET_PATH);
|
|
680
680
|
}
|
|
681
681
|
return index._emulatorUrl(config, EMULATOR_WIDGET_PATH);
|
|
682
682
|
}
|
|
@@ -721,7 +721,7 @@ function _getProjectConfig(auth, request) {
|
|
|
721
721
|
if (request === void 0) { request = {}; }
|
|
722
722
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
723
723
|
return tslib.__generator(this, function (_a) {
|
|
724
|
-
return [2 /*return*/, index._performApiRequest(auth, "GET" /* GET */, "/v1/projects" /* GET_PROJECT_CONFIG */, request)];
|
|
724
|
+
return [2 /*return*/, index._performApiRequest(auth, "GET" /* HttpMethod.GET */, "/v1/projects" /* Endpoint.GET_PROJECT_CONFIG */, request)];
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
727
|
}
|
|
@@ -772,7 +772,7 @@ function _generateHandlerUrl(auth, event, provider) {
|
|
|
772
772
|
additionalParams['apn'] = BuildInfo.packageName;
|
|
773
773
|
}
|
|
774
774
|
else {
|
|
775
|
-
index._fail(auth, "operation-not-supported-in-this-environment" /* OPERATION_NOT_SUPPORTED */);
|
|
775
|
+
index._fail(auth, "operation-not-supported-in-this-environment" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);
|
|
776
776
|
}
|
|
777
777
|
// Add the display name if available
|
|
778
778
|
if (BuildInfo.displayName) {
|
|
@@ -803,7 +803,7 @@ function _validateOrigin(auth) {
|
|
|
803
803
|
request.androidPackageName = BuildInfo.packageName;
|
|
804
804
|
}
|
|
805
805
|
else {
|
|
806
|
-
index._fail(auth, "operation-not-supported-in-this-environment" /* OPERATION_NOT_SUPPORTED */);
|
|
806
|
+
index._fail(auth, "operation-not-supported-in-this-environment" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);
|
|
807
807
|
}
|
|
808
808
|
// Will fail automatically if package name is not authorized
|
|
809
809
|
return [4 /*yield*/, _getProjectConfig(auth, request)];
|
|
@@ -874,7 +874,7 @@ function _waitForAppResume(auth, eventListener, iabRef) {
|
|
|
874
874
|
}
|
|
875
875
|
onCloseTimer = window.setTimeout(function () {
|
|
876
876
|
// Wait two seeconds after resume then reject.
|
|
877
|
-
reject(index._createError(auth, "redirect-cancelled-by-user" /* REDIRECT_CANCELLED_BY_USER */));
|
|
877
|
+
reject(index._createError(auth, "redirect-cancelled-by-user" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */));
|
|
878
878
|
}, REDIRECT_TIMEOUT_MS);
|
|
879
879
|
}
|
|
880
880
|
function visibilityChanged() {
|
|
@@ -924,22 +924,22 @@ function _checkCordovaConfiguration(auth) {
|
|
|
924
924
|
// Note that cordova-universal-links-plugin has been abandoned.
|
|
925
925
|
// A fork with latest fixes is available at:
|
|
926
926
|
// https://www.npmjs.com/package/cordova-universal-links-plugin-fix
|
|
927
|
-
index._assert(typeof ((_a = win === null || win === void 0 ? void 0 : win.universalLinks) === null || _a === void 0 ? void 0 : _a.subscribe) === 'function', auth, "invalid-cordova-configuration" /* INVALID_CORDOVA_CONFIGURATION */, {
|
|
927
|
+
index._assert(typeof ((_a = win === null || win === void 0 ? void 0 : win.universalLinks) === null || _a === void 0 ? void 0 : _a.subscribe) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
|
|
928
928
|
missingPlugin: 'cordova-universal-links-plugin-fix'
|
|
929
929
|
});
|
|
930
930
|
// https://www.npmjs.com/package/cordova-plugin-buildinfo
|
|
931
|
-
index._assert(typeof ((_b = win === null || win === void 0 ? void 0 : win.BuildInfo) === null || _b === void 0 ? void 0 : _b.packageName) !== 'undefined', auth, "invalid-cordova-configuration" /* INVALID_CORDOVA_CONFIGURATION */, {
|
|
931
|
+
index._assert(typeof ((_b = win === null || win === void 0 ? void 0 : win.BuildInfo) === null || _b === void 0 ? void 0 : _b.packageName) !== 'undefined', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
|
|
932
932
|
missingPlugin: 'cordova-plugin-buildInfo'
|
|
933
933
|
});
|
|
934
934
|
// https://github.com/google/cordova-plugin-browsertab
|
|
935
|
-
index._assert(typeof ((_e = (_d = (_c = win === null || win === void 0 ? void 0 : win.cordova) === null || _c === void 0 ? void 0 : _c.plugins) === null || _d === void 0 ? void 0 : _d.browsertab) === null || _e === void 0 ? void 0 : _e.openUrl) === 'function', auth, "invalid-cordova-configuration" /* INVALID_CORDOVA_CONFIGURATION */, {
|
|
935
|
+
index._assert(typeof ((_e = (_d = (_c = win === null || win === void 0 ? void 0 : win.cordova) === null || _c === void 0 ? void 0 : _c.plugins) === null || _d === void 0 ? void 0 : _d.browsertab) === null || _e === void 0 ? void 0 : _e.openUrl) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
|
|
936
936
|
missingPlugin: 'cordova-plugin-browsertab'
|
|
937
937
|
});
|
|
938
|
-
index._assert(typeof ((_h = (_g = (_f = win === null || win === void 0 ? void 0 : win.cordova) === null || _f === void 0 ? void 0 : _f.plugins) === null || _g === void 0 ? void 0 : _g.browsertab) === null || _h === void 0 ? void 0 : _h.isAvailable) === 'function', auth, "invalid-cordova-configuration" /* INVALID_CORDOVA_CONFIGURATION */, {
|
|
938
|
+
index._assert(typeof ((_h = (_g = (_f = win === null || win === void 0 ? void 0 : win.cordova) === null || _f === void 0 ? void 0 : _f.plugins) === null || _g === void 0 ? void 0 : _g.browsertab) === null || _h === void 0 ? void 0 : _h.isAvailable) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
|
|
939
939
|
missingPlugin: 'cordova-plugin-browsertab'
|
|
940
940
|
});
|
|
941
941
|
// https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/
|
|
942
|
-
index._assert(typeof ((_k = (_j = win === null || win === void 0 ? void 0 : win.cordova) === null || _j === void 0 ? void 0 : _j.InAppBrowser) === null || _k === void 0 ? void 0 : _k.open) === 'function', auth, "invalid-cordova-configuration" /* INVALID_CORDOVA_CONFIGURATION */, {
|
|
942
|
+
index._assert(typeof ((_k = (_j = win === null || win === void 0 ? void 0 : win.cordova) === null || _j === void 0 ? void 0 : _j.InAppBrowser) === null || _k === void 0 ? void 0 : _k.open) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
|
|
943
943
|
missingPlugin: 'cordova-plugin-inappbrowser'
|
|
944
944
|
});
|
|
945
945
|
}
|
|
@@ -1050,7 +1050,7 @@ var AuthEventManager = /** @class */ (function () {
|
|
|
1050
1050
|
var _a;
|
|
1051
1051
|
if (event.error && !isNullRedirectEvent(event)) {
|
|
1052
1052
|
var code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||
|
|
1053
|
-
"internal-error" /* INTERNAL_ERROR */;
|
|
1053
|
+
"internal-error" /* AuthErrorCode.INTERNAL_ERROR */;
|
|
1054
1054
|
consumer.onError(index._createError(this.auth, code));
|
|
1055
1055
|
}
|
|
1056
1056
|
else {
|
|
@@ -1080,16 +1080,16 @@ function eventUid(e) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
function isNullRedirectEvent(_a) {
|
|
1082
1082
|
var type = _a.type, error = _a.error;
|
|
1083
|
-
return (type === "unknown" /* UNKNOWN */ &&
|
|
1084
|
-
(error === null || error === void 0 ? void 0 : error.code) === "auth/"
|
|
1083
|
+
return (type === "unknown" /* AuthEventType.UNKNOWN */ &&
|
|
1084
|
+
(error === null || error === void 0 ? void 0 : error.code) === "auth/".concat("no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */));
|
|
1085
1085
|
}
|
|
1086
1086
|
function isRedirectEvent(event) {
|
|
1087
1087
|
switch (event.type) {
|
|
1088
|
-
case "signInViaRedirect" /* SIGN_IN_VIA_REDIRECT */:
|
|
1089
|
-
case "linkViaRedirect" /* LINK_VIA_REDIRECT */:
|
|
1090
|
-
case "reauthViaRedirect" /* REAUTH_VIA_REDIRECT */:
|
|
1088
|
+
case "signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:
|
|
1089
|
+
case "linkViaRedirect" /* AuthEventType.LINK_VIA_REDIRECT */:
|
|
1090
|
+
case "reauthViaRedirect" /* AuthEventType.REAUTH_VIA_REDIRECT */:
|
|
1091
1091
|
return true;
|
|
1092
|
-
case "unknown" /* UNKNOWN */:
|
|
1092
|
+
case "unknown" /* AuthEventType.UNKNOWN */:
|
|
1093
1093
|
return isNullRedirectEvent(event);
|
|
1094
1094
|
default:
|
|
1095
1095
|
return false;
|
|
@@ -1123,7 +1123,7 @@ var IE10_LOCAL_STORAGE_SYNC_DELAY = 10;
|
|
|
1123
1123
|
var BrowserLocalPersistence = /** @class */ (function (_super) {
|
|
1124
1124
|
tslib.__extends(BrowserLocalPersistence, _super);
|
|
1125
1125
|
function BrowserLocalPersistence() {
|
|
1126
|
-
var _this = _super.call(this, function () { return window.localStorage; }, "LOCAL" /* LOCAL */) || this;
|
|
1126
|
+
var _this = _super.call(this, function () { return window.localStorage; }, "LOCAL" /* PersistenceType.LOCAL */) || this;
|
|
1127
1127
|
_this.boundEventHandler = function (event, poll) { return _this.onStorageEvent(event, poll); };
|
|
1128
1128
|
_this.listeners = {};
|
|
1129
1129
|
_this.localCache = {};
|
|
@@ -1412,7 +1412,7 @@ function _generateNewEvent(auth, type, eventId) {
|
|
|
1412
1412
|
sessionId: generateSessionId(),
|
|
1413
1413
|
postBody: null,
|
|
1414
1414
|
tenantId: auth.tenantId,
|
|
1415
|
-
error: index._createError(auth, "no-auth-event" /* NO_AUTH_EVENT */)
|
|
1415
|
+
error: index._createError(auth, "no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */)
|
|
1416
1416
|
};
|
|
1417
1417
|
}
|
|
1418
1418
|
function _savePartialEvent(auth, event) {
|
|
@@ -1493,7 +1493,7 @@ function storage() {
|
|
|
1493
1493
|
return index._getInstance(browserLocalPersistence);
|
|
1494
1494
|
}
|
|
1495
1495
|
function persistenceKey(auth) {
|
|
1496
|
-
return index._persistenceKeyName("authEvent" /* AUTH_EVENT */, auth.config.apiKey, auth.name);
|
|
1496
|
+
return index._persistenceKeyName("authEvent" /* KeyName.AUTH_EVENT */, auth.config.apiKey, auth.name);
|
|
1497
1497
|
}
|
|
1498
1498
|
function parseJsonOrNull(json) {
|
|
1499
1499
|
try {
|
|
@@ -1574,7 +1574,7 @@ var CordovaPopupRedirectResolver = /** @class */ (function () {
|
|
|
1574
1574
|
});
|
|
1575
1575
|
};
|
|
1576
1576
|
CordovaPopupRedirectResolver.prototype._openPopup = function (auth) {
|
|
1577
|
-
index._fail(auth, "operation-not-supported-in-this-environment" /* OPERATION_NOT_SUPPORTED */);
|
|
1577
|
+
index._fail(auth, "operation-not-supported-in-this-environment" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);
|
|
1578
1578
|
};
|
|
1579
1579
|
CordovaPopupRedirectResolver.prototype._openRedirect = function (auth, provider, authType, eventId) {
|
|
1580
1580
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
@@ -1673,7 +1673,7 @@ var CordovaPopupRedirectResolver = /** @class */ (function () {
|
|
|
1673
1673
|
// https://github.com/EddyVerbruggen/Custom-URL-scheme
|
|
1674
1674
|
// Do not overwrite the existing developer's URL handler.
|
|
1675
1675
|
var existingHandleOpenURL = handleOpenURL;
|
|
1676
|
-
var packagePrefix = BuildInfo.packageName.toLowerCase()
|
|
1676
|
+
var packagePrefix = "".concat(BuildInfo.packageName.toLowerCase(), "://");
|
|
1677
1677
|
_cordovaWindow().handleOpenURL = function (url) { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
1678
1678
|
return tslib.__generator(this, function (_a) {
|
|
1679
1679
|
if (url.toLowerCase().startsWith(packagePrefix)) {
|
|
@@ -1706,13 +1706,13 @@ var CordovaPopupRedirectResolver = /** @class */ (function () {
|
|
|
1706
1706
|
var cordovaPopupRedirectResolver = CordovaPopupRedirectResolver;
|
|
1707
1707
|
function generateNoEvent() {
|
|
1708
1708
|
return {
|
|
1709
|
-
type: "unknown" /* UNKNOWN */,
|
|
1709
|
+
type: "unknown" /* AuthEventType.UNKNOWN */,
|
|
1710
1710
|
eventId: null,
|
|
1711
1711
|
sessionId: null,
|
|
1712
1712
|
urlResponse: null,
|
|
1713
1713
|
postBody: null,
|
|
1714
1714
|
tenantId: null,
|
|
1715
|
-
error: index._createError("no-auth-event" /* NO_AUTH_EVENT */)
|
|
1715
|
+
error: index._createError("no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */)
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
|