@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/node-esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-eddbee39.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
4
|
import 'tslib';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ap as _getInstance, aq as _assert, ar as _signInWithCredential, as as _reauthenticate, at as _link$1, H as AuthCredential, au as signInWithIdp, av as _fail, aw as debugAssert, ax as _persistenceKeyName, ay as _castAuth, az as FederatedAuthProvider, aA as BaseOAuthProvider, aB as _emulatorUrl, aC as _performApiRequest, aD as _isIOS7Or8, aE as _isIOS, aF as _isAndroid, aG as _createError, aH as _isSafari, aI as _isIframe, aJ as _isMobileBrowser, aK as _isIE10 } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aM as AuthImpl, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aO 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, aP as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aL as UserImpl, aq as _assert, ay as _castAuth, av as _fail, aN as _getClientVersion, ap as _getInstance, ax 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 _getInstance, aq as _assert, ar as _signInWithCredential, as as _reauthenticate, at as _link$1, H as AuthCredential, au as signInWithIdp, av as _fail, aw as debugAssert, ax as _persistenceKeyName, ay as _castAuth, az as FederatedAuthProvider, aA as BaseOAuthProvider, aB as _emulatorUrl, aC as _performApiRequest, aD as _isIOS7Or8, aE as _isIOS, aF as _isAndroid, aG as _createError, aH as _isSafari, aI as _isIframe, aJ as _isMobileBrowser, aK as _isIE10 } from './index-eddbee39.js';
|
|
2
|
+
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aM as AuthImpl, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aO 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, aP as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aL as UserImpl, aq as _assert, ay as _castAuth, av as _fail, aN as _getClientVersion, ap as _getInstance, ax 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-eddbee39.js';
|
|
3
3
|
import { querystring, isEmpty, getUA, querystringDecode } from '@firebase/util';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import { SDK_VERSION } from '@firebase/app';
|
package/dist/rn/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var ReactNative = require('react-native');
|
|
6
6
|
var app = require('@firebase/app');
|
|
7
|
-
var phone = require('./phone-
|
|
7
|
+
var phone = require('./phone-747adb52.js');
|
|
8
8
|
var tslib = require('tslib');
|
|
9
9
|
require('@firebase/util');
|
|
10
10
|
require('@firebase/component');
|
package/dist/rn/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var phone = require('./phone-
|
|
5
|
+
var phone = require('./phone-747adb52.js');
|
|
6
6
|
var tslib = require('tslib');
|
|
7
7
|
var util = require('@firebase/util');
|
|
8
8
|
var app = require('@firebase/app');
|
|
@@ -2866,6 +2866,46 @@ var browserPopupRedirectResolver = BrowserPopupRedirectResolver;
|
|
|
2866
2866
|
* See the License for the specific language governing permissions and
|
|
2867
2867
|
* limitations under the License.
|
|
2868
2868
|
*/
|
|
2869
|
+
var DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;
|
|
2870
|
+
var authIdTokenMaxAge = util.getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;
|
|
2871
|
+
var lastPostedIdToken = null;
|
|
2872
|
+
var mintCookieFactory = function (url) { return function (user) { return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
2873
|
+
var idTokenResult, _a, idTokenAge, idToken;
|
|
2874
|
+
return tslib.__generator(this, function (_b) {
|
|
2875
|
+
switch (_b.label) {
|
|
2876
|
+
case 0:
|
|
2877
|
+
_a = user;
|
|
2878
|
+
if (!_a) return [3 /*break*/, 2];
|
|
2879
|
+
return [4 /*yield*/, user.getIdTokenResult()];
|
|
2880
|
+
case 1:
|
|
2881
|
+
_a = (_b.sent());
|
|
2882
|
+
_b.label = 2;
|
|
2883
|
+
case 2:
|
|
2884
|
+
idTokenResult = _a;
|
|
2885
|
+
idTokenAge = idTokenResult &&
|
|
2886
|
+
(new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;
|
|
2887
|
+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
|
|
2888
|
+
return [2 /*return*/];
|
|
2889
|
+
}
|
|
2890
|
+
idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
|
|
2891
|
+
if (lastPostedIdToken === idToken) {
|
|
2892
|
+
return [2 /*return*/];
|
|
2893
|
+
}
|
|
2894
|
+
lastPostedIdToken = idToken;
|
|
2895
|
+
return [4 /*yield*/, fetch(url, {
|
|
2896
|
+
method: idToken ? 'POST' : 'DELETE',
|
|
2897
|
+
headers: idToken
|
|
2898
|
+
? {
|
|
2899
|
+
'Authorization': "Bearer " + idToken
|
|
2900
|
+
}
|
|
2901
|
+
: {}
|
|
2902
|
+
})];
|
|
2903
|
+
case 3:
|
|
2904
|
+
_b.sent();
|
|
2905
|
+
return [2 /*return*/];
|
|
2906
|
+
}
|
|
2907
|
+
});
|
|
2908
|
+
}); }; };
|
|
2869
2909
|
/**
|
|
2870
2910
|
* Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.
|
|
2871
2911
|
* If no instance exists, initializes an Auth instance with platform-specific default dependencies.
|
|
@@ -2880,7 +2920,7 @@ function getAuth(app$1) {
|
|
|
2880
2920
|
if (provider.isInitialized()) {
|
|
2881
2921
|
return provider.getImmediate();
|
|
2882
2922
|
}
|
|
2883
|
-
|
|
2923
|
+
var auth = phone.initializeAuth(app$1, {
|
|
2884
2924
|
popupRedirectResolver: browserPopupRedirectResolver,
|
|
2885
2925
|
persistence: [
|
|
2886
2926
|
indexedDBLocalPersistence,
|
|
@@ -2888,6 +2928,19 @@ function getAuth(app$1) {
|
|
|
2888
2928
|
browserSessionPersistence
|
|
2889
2929
|
]
|
|
2890
2930
|
});
|
|
2931
|
+
var authTokenSyncUrl = util.getExperimentalSetting('authTokenSyncURL');
|
|
2932
|
+
if (authTokenSyncUrl) {
|
|
2933
|
+
var mintCookie_1 = mintCookieFactory(authTokenSyncUrl);
|
|
2934
|
+
phone.beforeAuthStateChanged(auth, mintCookie_1, function () {
|
|
2935
|
+
return mintCookie_1(auth.currentUser);
|
|
2936
|
+
});
|
|
2937
|
+
phone.onIdTokenChanged(auth, function (user) { return mintCookie_1(user); });
|
|
2938
|
+
}
|
|
2939
|
+
var authEmulatorHost = util.getDefaultEmulatorHost('auth');
|
|
2940
|
+
if (authEmulatorHost) {
|
|
2941
|
+
phone.connectAuthEmulator(auth, "http://" + authEmulatorHost);
|
|
2942
|
+
}
|
|
2943
|
+
return auth;
|
|
2891
2944
|
}
|
|
2892
2945
|
phone.registerAuth("Browser" /* BROWSER */);
|
|
2893
2946
|
|