@firebase/auth 0.20.7 → 0.20.8-canary.9799efe9d
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 +10 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +57 -4
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-d3ceb9fa.js → popup_redirect-6fdcf7be.js} +2 -2
- package/dist/cordova/{popup_redirect-d3ceb9fa.js.map → popup_redirect-6fdcf7be.js.map} +1 -1
- package/dist/esm2017/{index-4dc22a28.js → index-0a6746f3.js} +41 -5
- package/dist/esm2017/{index-4dc22a28.js.map → index-0a6746f3.js.map} +1 -1
- package/dist/esm2017/index.js +2 -2
- package/dist/esm2017/internal.js +3 -3
- package/dist/esm5/{index-e8139339.js → index-615dcffe.js} +57 -4
- package/dist/esm5/{index-e8139339.js.map → index-615dcffe.js.map} +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/index.webworker.esm5.js +1 -1
- package/dist/node/{index-fe75eadf.js → index-25bbe4e1.js} +8 -3
- package/dist/node/{index-fe75eadf.js.map → index-25bbe4e1.js.map} +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node-esm/{index-2a56c39c.js → index-eddbee39.js} +9 -4
- package/dist/node-esm/{index-2a56c39c.js.map → index-eddbee39.js.map} +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +55 -2
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-bf6b4ef6.js → phone-747adb52.js} +2 -2
- package/dist/rn/{phone-bf6b4ef6.js.map → phone-747adb52.js.map} +1 -1
- package/package.json +6 -6
package/dist/esm2017/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-0a6746f3.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
|
-
import 'tslib';
|
|
5
4
|
import '@firebase/logger';
|
|
5
|
+
import 'tslib';
|
|
6
6
|
import '@firebase/component';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm2017/internal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ap as _isIOS7Or8, aq as debugAssert, ar as _isIOS, as as _isAndroid, at as _fail, au as _getRedirectUrl, av as _getProjectConfig, aw as _createError, ax as _assert, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as AuthEventManager, a as browserSessionPersistence, aB as _getRedirectResult, aC as _overrideRedirectResult, aD as _clearRedirectOutcomes, aE as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aG as AuthImpl, aJ as AuthPopup, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aK as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aL as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aF as UserImpl, ax as _assert, aE as _castAuth, at as _fail, aI as _generateEventId, aH as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, aC as _overrideRedirectResult, az as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { ap as _isIOS7Or8, aq as debugAssert, ar as _isIOS, as as _isAndroid, at as _fail, au as _getRedirectUrl, av as _getProjectConfig, aw as _createError, ax as _assert, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as AuthEventManager, a as browserSessionPersistence, aB as _getRedirectResult, aC as _overrideRedirectResult, aD as _clearRedirectOutcomes, aE as _castAuth } from './index-0a6746f3.js';
|
|
2
|
+
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aG as AuthImpl, aJ as AuthPopup, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aK as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aL as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aF as UserImpl, ax as _assert, aE as _castAuth, at as _fail, aI as _generateEventId, aH as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, aC as _overrideRedirectResult, az as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-0a6746f3.js';
|
|
3
3
|
import { querystringDecode } from '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
|
5
|
-
import 'tslib';
|
|
6
5
|
import '@firebase/logger';
|
|
6
|
+
import 'tslib';
|
|
7
7
|
import '@firebase/component';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __spreadArray, __assign, __awaiter, __generator, __rest, __extends } from 'tslib';
|
|
2
|
-
import { ErrorFactory, deepEqual, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, isIE, getUA, createSubscribe, querystringDecode, extractQuerystring, isEmpty } from '@firebase/util';
|
|
2
|
+
import { ErrorFactory, deepEqual, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, isIE, getUA, createSubscribe, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
3
3
|
import { SDK_VERSION, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';
|
|
4
4
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
5
5
|
import { Component } from '@firebase/component';
|
|
@@ -11074,7 +11074,7 @@ var PhoneMultiFactorGenerator = /** @class */ (function () {
|
|
|
11074
11074
|
}());
|
|
11075
11075
|
|
|
11076
11076
|
var name = "@firebase/auth";
|
|
11077
|
-
var version = "0.20.
|
|
11077
|
+
var version = "0.20.8-canary.9799efe9d";
|
|
11078
11078
|
|
|
11079
11079
|
/**
|
|
11080
11080
|
* @license
|
|
@@ -11254,6 +11254,46 @@ function registerAuth(clientPlatform) {
|
|
|
11254
11254
|
* See the License for the specific language governing permissions and
|
|
11255
11255
|
* limitations under the License.
|
|
11256
11256
|
*/
|
|
11257
|
+
var DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;
|
|
11258
|
+
var authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;
|
|
11259
|
+
var lastPostedIdToken = null;
|
|
11260
|
+
var mintCookieFactory = function (url) { return function (user) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11261
|
+
var idTokenResult, _a, idTokenAge, idToken;
|
|
11262
|
+
return __generator(this, function (_b) {
|
|
11263
|
+
switch (_b.label) {
|
|
11264
|
+
case 0:
|
|
11265
|
+
_a = user;
|
|
11266
|
+
if (!_a) return [3 /*break*/, 2];
|
|
11267
|
+
return [4 /*yield*/, user.getIdTokenResult()];
|
|
11268
|
+
case 1:
|
|
11269
|
+
_a = (_b.sent());
|
|
11270
|
+
_b.label = 2;
|
|
11271
|
+
case 2:
|
|
11272
|
+
idTokenResult = _a;
|
|
11273
|
+
idTokenAge = idTokenResult &&
|
|
11274
|
+
(new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;
|
|
11275
|
+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
|
|
11276
|
+
return [2 /*return*/];
|
|
11277
|
+
}
|
|
11278
|
+
idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
|
|
11279
|
+
if (lastPostedIdToken === idToken) {
|
|
11280
|
+
return [2 /*return*/];
|
|
11281
|
+
}
|
|
11282
|
+
lastPostedIdToken = idToken;
|
|
11283
|
+
return [4 /*yield*/, fetch(url, {
|
|
11284
|
+
method: idToken ? 'POST' : 'DELETE',
|
|
11285
|
+
headers: idToken
|
|
11286
|
+
? {
|
|
11287
|
+
'Authorization': "Bearer " + idToken
|
|
11288
|
+
}
|
|
11289
|
+
: {}
|
|
11290
|
+
})];
|
|
11291
|
+
case 3:
|
|
11292
|
+
_b.sent();
|
|
11293
|
+
return [2 /*return*/];
|
|
11294
|
+
}
|
|
11295
|
+
});
|
|
11296
|
+
}); }; };
|
|
11257
11297
|
/**
|
|
11258
11298
|
* Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.
|
|
11259
11299
|
* If no instance exists, initializes an Auth instance with platform-specific default dependencies.
|
|
@@ -11268,7 +11308,7 @@ function getAuth(app) {
|
|
|
11268
11308
|
if (provider.isInitialized()) {
|
|
11269
11309
|
return provider.getImmediate();
|
|
11270
11310
|
}
|
|
11271
|
-
|
|
11311
|
+
var auth = initializeAuth(app, {
|
|
11272
11312
|
popupRedirectResolver: browserPopupRedirectResolver,
|
|
11273
11313
|
persistence: [
|
|
11274
11314
|
indexedDBLocalPersistence,
|
|
@@ -11276,8 +11316,21 @@ function getAuth(app) {
|
|
|
11276
11316
|
browserSessionPersistence
|
|
11277
11317
|
]
|
|
11278
11318
|
});
|
|
11319
|
+
var authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');
|
|
11320
|
+
if (authTokenSyncUrl) {
|
|
11321
|
+
var mintCookie_1 = mintCookieFactory(authTokenSyncUrl);
|
|
11322
|
+
beforeAuthStateChanged(auth, mintCookie_1, function () {
|
|
11323
|
+
return mintCookie_1(auth.currentUser);
|
|
11324
|
+
});
|
|
11325
|
+
onIdTokenChanged(auth, function (user) { return mintCookie_1(user); });
|
|
11326
|
+
}
|
|
11327
|
+
var authEmulatorHost = getDefaultEmulatorHost('auth');
|
|
11328
|
+
if (authEmulatorHost) {
|
|
11329
|
+
connectAuthEmulator(auth, "http://" + authEmulatorHost);
|
|
11330
|
+
}
|
|
11331
|
+
return auth;
|
|
11279
11332
|
}
|
|
11280
11333
|
registerAuth("Browser" /* BROWSER */);
|
|
11281
11334
|
|
|
11282
11335
|
export { signInWithCustomToken as $, ActionCodeOperation as A, debugErrorMap as B, prodErrorMap as C, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as D, initializeAuth as E, FactorId as F, connectAuthEmulator as G, AuthCredential as H, EmailAuthCredential as I, OAuthCredential as J, PhoneAuthCredential as K, inMemoryPersistence as L, EmailAuthProvider as M, FacebookAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GoogleAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, GithubAuthProvider as T, OAuthProvider as U, SAMLAuthProvider as V, TwitterAuthProvider as W, signInAnonymously as X, signInWithCredential as Y, linkWithCredential as Z, reauthenticateWithCredential as _, browserSessionPersistence as a, sendPasswordResetEmail as a0, confirmPasswordReset as a1, applyActionCode as a2, checkActionCode as a3, verifyPasswordResetCode as a4, createUserWithEmailAndPassword as a5, signInWithEmailAndPassword as a6, sendSignInLinkToEmail as a7, isSignInWithEmailLink as a8, signInWithEmailLink as a9, _persistenceKeyName as aA, _clearRedirectOutcomes as aB, _getRedirectResult as aC, _overrideRedirectResult as aD, _castAuth as aE, UserImpl as aF, AuthImpl as aG, _getClientVersion as aH, _generateEventId as aI, AuthPopup as aJ, FetchProvider as aK, SAMLAuthCredential as aL, fetchSignInMethodsForEmail as aa, sendEmailVerification as ab, verifyBeforeUpdateEmail as ac, ActionCodeURL as ad, parseActionCodeURL as ae, updateProfile as af, updateEmail as ag, updatePassword as ah, getIdToken as ai, getIdTokenResult as aj, unlink as ak, getAdditionalUserInfo as al, reload as am, getMultiFactorResolver as an, multiFactor as ao, _isAndroid as ap, _isIOS7Or8 as aq, _isIOS as ar, _fail as as, _getRedirectUrl as at, debugAssert as au, _getProjectConfig as av, _createError as aw, _assert as ax, AuthEventManager as ay, _getInstance as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, beforeAuthStateChanged as t, updatePhoneNumber as u, onAuthStateChanged as v, useDeviceLanguage as w, updateCurrentUser as x, signOut as y, deleteUser as z };
|
|
11283
|
-
//# sourceMappingURL=index-
|
|
11336
|
+
//# sourceMappingURL=index-615dcffe.js.map
|