@firebase/auth 0.20.7 → 0.20.8-20220929164943
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 +11 -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-e400d63b.js} +2 -2
- package/dist/cordova/{popup_redirect-d3ceb9fa.js.map → popup_redirect-e400d63b.js.map} +1 -1
- package/dist/esm2017/{index-4dc22a28.js → index-4a52b4dc.js} +41 -5
- package/dist/esm2017/{index-4dc22a28.js.map → index-4a52b4dc.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-facb3a2f.js} +57 -4
- package/dist/esm5/{index-e8139339.js.map → index-facb3a2f.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-9d8b679f.js} +8 -3
- package/dist/node/{index-fe75eadf.js.map → index-9d8b679f.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-c33d692f.js} +9 -4
- package/dist/node-esm/{index-2a56c39c.js.map → index-c33d692f.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-089a1175.js} +2 -2
- package/dist/rn/{phone-bf6b4ef6.js.map → phone-089a1175.js.map} +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @firebase/auth
|
|
2
2
|
|
|
3
|
+
## 0.20.8-20220929164943
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fdd4ab464`](https://github.com/firebase/firebase-js-sdk/commit/fdd4ab464b59a107bdcc195df3f01e32efd89ed4) [#6526](https://github.com/firebase/firebase-js-sdk/pull/6526) - Add functionality to auto-initialize project config and emulator settings from global defaults provided by framework tooling.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`fdd4ab464`](https://github.com/firebase/firebase-js-sdk/commit/fdd4ab464b59a107bdcc195df3f01e32efd89ed4)]:
|
|
10
|
+
- @firebase/app@0.8.0-20220929164943
|
|
11
|
+
- @firebase/util@1.7.0-20220929164943
|
|
12
|
+
- @firebase/component@0.5.18-20220929164943
|
|
13
|
+
|
|
3
14
|
## 0.20.7
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cordova/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getApp, _getProvider } from '@firebase/app';
|
|
2
|
-
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-
|
|
3
|
-
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-
|
|
2
|
+
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-e400d63b.js';
|
|
3
|
+
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-e400d63b.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import '@firebase/util';
|
|
6
6
|
import '@firebase/component';
|
package/dist/cordova/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { af as _performApiRequest, ag as _addTidIfNecessary, ah as _createError, ai as _assert, aj as Delay, ak as _window, al as _isHttpOrHttps, am as _isWorker, an as _castAuth, J as signInWithCredential, ao as sendPhoneVerificationCode, ap as startEnrollPhoneMfa, K as linkWithCredential, aq as _assertLinkedStatus, L as reauthenticateWithCredential, ar as _link, x as PhoneAuthCredential, as as debugAssert, at as _generateEventId, au as AbstractPopupRedirectOperation, av as _assertInstanceOf, aw as _withDefaultResolver, ax as FederatedAuthProvider, ay as _fail, az as _getProjectConfig, aA as _getCurrentUrl, aB as _emulatorUrl, aC as _isChromeIOS, aD as _isFirefox, aE as _isIOSStandalone, aF as _isMobileBrowser, aG as _isSafari, aH as _isIOS, f as browserSessionPersistence, aI as _getRedirectResult, aJ as _overrideRedirectResult, aK as _getRedirectUrl, aL as _setWindowLocation, aM as AuthEventManager, aN as debugFail, aO as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence } from './popup_redirect-
|
|
2
|
-
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, aS as AuthImpl, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, aU as FetchProvider, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, aV as SAMLAuthCredential, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aQ as UserImpl, ai as _assert, an as _castAuth, ay as _fail, at as _generateEventId, aT as _getClientVersion, aR as _getInstance, aI as _getRedirectResult, aJ as _overrideRedirectResult, aP as _persistenceKeyName, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, aX as linkWithRedirect, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, aY as reauthenticateWithRedirect, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, aW as signInWithRedirect, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-
|
|
1
|
+
import { af as _performApiRequest, ag as _addTidIfNecessary, ah as _createError, ai as _assert, aj as Delay, ak as _window, al as _isHttpOrHttps, am as _isWorker, an as _castAuth, J as signInWithCredential, ao as sendPhoneVerificationCode, ap as startEnrollPhoneMfa, K as linkWithCredential, aq as _assertLinkedStatus, L as reauthenticateWithCredential, ar as _link, x as PhoneAuthCredential, as as debugAssert, at as _generateEventId, au as AbstractPopupRedirectOperation, av as _assertInstanceOf, aw as _withDefaultResolver, ax as FederatedAuthProvider, ay as _fail, az as _getProjectConfig, aA as _getCurrentUrl, aB as _emulatorUrl, aC as _isChromeIOS, aD as _isFirefox, aE as _isIOSStandalone, aF as _isMobileBrowser, aG as _isSafari, aH as _isIOS, f as browserSessionPersistence, aI as _getRedirectResult, aJ as _overrideRedirectResult, aK as _getRedirectUrl, aL as _setWindowLocation, aM as AuthEventManager, aN as debugFail, aO as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, h as beforeAuthStateChanged, o as onIdTokenChanged, t as connectAuthEmulator } from './popup_redirect-e400d63b.js';
|
|
2
|
+
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, aS as AuthImpl, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, aU as FetchProvider, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, aV as SAMLAuthCredential, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aQ as UserImpl, ai as _assert, an as _castAuth, ay as _fail, at as _generateEventId, aT as _getClientVersion, aR as _getInstance, aI as _getRedirectResult, aJ as _overrideRedirectResult, aP as _persistenceKeyName, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, aX as linkWithRedirect, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, aY as reauthenticateWithRedirect, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, aW as signInWithRedirect, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-e400d63b.js';
|
|
3
3
|
import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
|
|
4
|
-
import { querystring, getModularInstance, getUA } from '@firebase/util';
|
|
4
|
+
import { querystring, getModularInstance, getUA, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
5
5
|
import { SDK_VERSION, getApp, _getProvider } from '@firebase/app';
|
|
6
6
|
import '@firebase/component';
|
|
7
7
|
import '@firebase/logger';
|
|
@@ -1869,6 +1869,46 @@ var PhoneMultiFactorGenerator = /** @class */ (function () {
|
|
|
1869
1869
|
* See the License for the specific language governing permissions and
|
|
1870
1870
|
* limitations under the License.
|
|
1871
1871
|
*/
|
|
1872
|
+
var DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;
|
|
1873
|
+
var authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;
|
|
1874
|
+
var lastPostedIdToken = null;
|
|
1875
|
+
var mintCookieFactory = function (url) { return function (user) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1876
|
+
var idTokenResult, _a, idTokenAge, idToken;
|
|
1877
|
+
return __generator(this, function (_b) {
|
|
1878
|
+
switch (_b.label) {
|
|
1879
|
+
case 0:
|
|
1880
|
+
_a = user;
|
|
1881
|
+
if (!_a) return [3 /*break*/, 2];
|
|
1882
|
+
return [4 /*yield*/, user.getIdTokenResult()];
|
|
1883
|
+
case 1:
|
|
1884
|
+
_a = (_b.sent());
|
|
1885
|
+
_b.label = 2;
|
|
1886
|
+
case 2:
|
|
1887
|
+
idTokenResult = _a;
|
|
1888
|
+
idTokenAge = idTokenResult &&
|
|
1889
|
+
(new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;
|
|
1890
|
+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
|
|
1891
|
+
return [2 /*return*/];
|
|
1892
|
+
}
|
|
1893
|
+
idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
|
|
1894
|
+
if (lastPostedIdToken === idToken) {
|
|
1895
|
+
return [2 /*return*/];
|
|
1896
|
+
}
|
|
1897
|
+
lastPostedIdToken = idToken;
|
|
1898
|
+
return [4 /*yield*/, fetch(url, {
|
|
1899
|
+
method: idToken ? 'POST' : 'DELETE',
|
|
1900
|
+
headers: idToken
|
|
1901
|
+
? {
|
|
1902
|
+
'Authorization': "Bearer " + idToken
|
|
1903
|
+
}
|
|
1904
|
+
: {}
|
|
1905
|
+
})];
|
|
1906
|
+
case 3:
|
|
1907
|
+
_b.sent();
|
|
1908
|
+
return [2 /*return*/];
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
}); }; };
|
|
1872
1912
|
/**
|
|
1873
1913
|
* Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.
|
|
1874
1914
|
* If no instance exists, initializes an Auth instance with platform-specific default dependencies.
|
|
@@ -1883,7 +1923,7 @@ function getAuth(app) {
|
|
|
1883
1923
|
if (provider.isInitialized()) {
|
|
1884
1924
|
return provider.getImmediate();
|
|
1885
1925
|
}
|
|
1886
|
-
|
|
1926
|
+
var auth = initializeAuth(app, {
|
|
1887
1927
|
popupRedirectResolver: browserPopupRedirectResolver,
|
|
1888
1928
|
persistence: [
|
|
1889
1929
|
indexedDBLocalPersistence,
|
|
@@ -1891,6 +1931,19 @@ function getAuth(app) {
|
|
|
1891
1931
|
browserSessionPersistence
|
|
1892
1932
|
]
|
|
1893
1933
|
});
|
|
1934
|
+
var authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');
|
|
1935
|
+
if (authTokenSyncUrl) {
|
|
1936
|
+
var mintCookie_1 = mintCookieFactory(authTokenSyncUrl);
|
|
1937
|
+
beforeAuthStateChanged(auth, mintCookie_1, function () {
|
|
1938
|
+
return mintCookie_1(auth.currentUser);
|
|
1939
|
+
});
|
|
1940
|
+
onIdTokenChanged(auth, function (user) { return mintCookie_1(user); });
|
|
1941
|
+
}
|
|
1942
|
+
var authEmulatorHost = getDefaultEmulatorHost('auth');
|
|
1943
|
+
if (authEmulatorHost) {
|
|
1944
|
+
connectAuthEmulator(auth, "http://" + authEmulatorHost);
|
|
1945
|
+
}
|
|
1946
|
+
return auth;
|
|
1894
1947
|
}
|
|
1895
1948
|
registerAuth("Browser" /* BROWSER */);
|
|
1896
1949
|
|