@firebase/auth 0.23.2-canary.e12e7f535 → 0.23.2-canary.e522056fc
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/dist/auth-public.d.ts +43 -3
- package/dist/auth.d.ts +43 -3
- package/dist/browser-cjs/{index-6efa45d4.js → index-7aac2604.js} +68 -13
- package/dist/browser-cjs/index-7aac2604.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/core/index.d.ts +4 -0
- package/dist/browser-cjs/src/mfa/mfa_session.d.ts +3 -3
- package/dist/browser-cjs/src/model/public_types.d.ts +2 -0
- package/dist/browser-cjs/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/browser-cjs/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/browser-cjs/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +38 -10
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-03a0e499.js → popup_redirect-5e62d3e3.js} +35 -8
- package/dist/cordova/{popup_redirect-03a0e499.js.map → popup_redirect-5e62d3e3.js.map} +1 -1
- package/dist/cordova/src/core/index.d.ts +4 -0
- package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
- package/dist/cordova/src/model/public_types.d.ts +2 -0
- package/dist/cordova/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/cordova/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/cordova/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/cordova/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/cordova/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/cordova/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm2017/{index-2969aa9a.js → index-31f2f313.js} +68 -13
- package/dist/esm2017/index-31f2f313.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/core/index.d.ts +4 -0
- package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm2017/src/model/public_types.d.ts +2 -0
- package/dist/esm2017/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/esm2017/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/esm2017/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/esm2017/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm5/{index-9479a8cd.js → index-cf3bd4cb.js} +71 -16
- package/dist/esm5/index-cf3bd4cb.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/core/index.d.ts +4 -0
- package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm5/src/model/public_types.d.ts +2 -0
- package/dist/esm5/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/esm5/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/esm5/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/esm5/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/esm5/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/esm5/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/index.webworker.esm5.js +26 -6
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/core/index.d.ts +4 -0
- package/dist/node/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node/src/model/public_types.d.ts +2 -0
- package/dist/node/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/node/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/node/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/node/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/node/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/node/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/node/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/node/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node/{totp-976deb0d.js → totp-dd7ce942.js} +34 -13
- package/dist/node/{totp-976deb0d.js.map → totp-dd7ce942.js.map} +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/src/core/index.d.ts +4 -0
- package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node-esm/src/model/public_types.d.ts +2 -0
- package/dist/node-esm/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/node-esm/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/node-esm/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node-esm/{totp-6ab1445c.js → totp-f45afc87.js} +31 -10
- package/dist/node-esm/{totp-6ab1445c.js.map → totp-f45afc87.js.map} +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +24 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-dd77fd2b.js → phone-8c99ec29.js} +48 -8
- package/dist/rn/{phone-dd77fd2b.js.map → phone-8c99ec29.js.map} +1 -1
- package/dist/rn/src/core/index.d.ts +4 -0
- package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
- package/dist/rn/src/model/public_types.d.ts +2 -0
- package/dist/rn/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/rn/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/rn/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/rn/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/rn/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/rn/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/rn/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/src/core/index.d.ts +4 -0
- package/dist/src/mfa/mfa_session.d.ts +3 -3
- package/dist/src/model/public_types.d.ts +2 -0
- package/dist/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +3 -0
- package/dist/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/test/helpers/integration/helpers.d.ts +1 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-6efa45d4.js.map +0 -1
- package/dist/esm2017/index-2969aa9a.js.map +0 -1
- package/dist/esm5/index-9479a8cd.js.map +0 -1
package/dist/esm5/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-cf3bd4cb.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
package/dist/esm5/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { as as _isIOS, at as _isAndroid, au as _fail, av as _getRedirectUrl, aw as debugAssert, ax as _getProjectConfig, ay as _isIOS7Or8, az as _assert, aA as _createError, aB as AuthEventManager, aC as _getInstance, b as browserLocalPersistence, aD as _persistenceKeyName, aE as _clearRedirectOutcomes, a as browserSessionPersistence, aF as _getRedirectResult, aG as _overrideRedirectResult, aH as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, aJ as AuthImpl, aM as AuthPopup, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, aN as FetchProvider, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aO as SAMLAuthCredential, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, aI as UserImpl, az as _assert, aH as _castAuth, au as _fail, aL as _generateEventId, aK as _getClientVersion, aC as _getInstance, aF as _getRedirectResult, aG as _overrideRedirectResult, aD as _persistenceKeyName, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { as as _isIOS, at as _isAndroid, au as _fail, av as _getRedirectUrl, aw as debugAssert, ax as _getProjectConfig, ay as _isIOS7Or8, az as _assert, aA as _createError, aB as AuthEventManager, aC as _getInstance, b as browserLocalPersistence, aD as _persistenceKeyName, aE as _clearRedirectOutcomes, a as browserSessionPersistence, aF as _getRedirectResult, aG as _overrideRedirectResult, aH as _castAuth } from './index-cf3bd4cb.js';
|
|
2
|
+
export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, aJ as AuthImpl, aM as AuthPopup, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, aN as FetchProvider, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aO as SAMLAuthCredential, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, aI as UserImpl, az as _assert, aH as _castAuth, au as _fail, aL as _generateEventId, aK as _getClientVersion, aC as _getInstance, aF as _getRedirectResult, aG as _overrideRedirectResult, aD as _persistenceKeyName, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-cf3bd4cb.js';
|
|
3
3
|
import { __awaiter, __generator, __extends } from 'tslib';
|
|
4
4
|
import { querystringDecode } from '@firebase/util';
|
|
5
5
|
import '@firebase/app';
|
|
@@ -26,6 +26,8 @@ export { debugErrorMap, prodErrorMap, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY
|
|
|
26
26
|
* remembered or not. It also makes it easier to never persist the `Auth` state for applications
|
|
27
27
|
* that are shared by other users or have sensitive data.
|
|
28
28
|
*
|
|
29
|
+
* This method does not work in a Node.js environment.
|
|
30
|
+
*
|
|
29
31
|
* @example
|
|
30
32
|
* ```javascript
|
|
31
33
|
* setPersistence(auth, browserSessionPersistence);
|
|
@@ -54,6 +56,8 @@ export declare function setPersistence(auth: Auth, persistence: Persistence): Pr
|
|
|
54
56
|
* Thus, by calling this optional method, you will reduce the latency of future auth flows.
|
|
55
57
|
* Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
|
|
56
58
|
*
|
|
59
|
+
* This method does not work in a Node.js environment.
|
|
60
|
+
*
|
|
57
61
|
* @example
|
|
58
62
|
* ```javascript
|
|
59
63
|
* initializeRecaptchaConfig(auth);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { UserInternal } from '../model/user';
|
|
18
18
|
import { MultiFactorSession } from '../model/public_types';
|
|
19
19
|
export declare const enum MultiFactorSessionType {
|
|
20
20
|
ENROLL = "enroll",
|
|
@@ -29,9 +29,9 @@ interface SerializedMultiFactorSession {
|
|
|
29
29
|
export declare class MultiFactorSessionImpl implements MultiFactorSession {
|
|
30
30
|
readonly type: MultiFactorSessionType;
|
|
31
31
|
readonly credential: string;
|
|
32
|
-
readonly
|
|
32
|
+
readonly user?: UserInternal | undefined;
|
|
33
33
|
private constructor();
|
|
34
|
-
static _fromIdtoken(idToken: string,
|
|
34
|
+
static _fromIdtoken(idToken: string, user?: UserInternal): MultiFactorSessionImpl;
|
|
35
35
|
static _fromMfaPendingCredential(mfaPendingCredential: string): MultiFactorSessionImpl;
|
|
36
36
|
toJSON(): SerializedMultiFactorSession;
|
|
37
37
|
static fromJSON(obj: Partial<SerializedMultiFactorSession>): MultiFactorSessionImpl | null;
|
|
@@ -170,6 +170,8 @@ export interface Auth {
|
|
|
170
170
|
* remembered or not. It also makes it easier to never persist the Auth state for applications
|
|
171
171
|
* that are shared by other users or have sensitive data.
|
|
172
172
|
*
|
|
173
|
+
* This method does not work in a Node.js environment.
|
|
174
|
+
*
|
|
173
175
|
* @example
|
|
174
176
|
* ```javascript
|
|
175
177
|
* auth.setPersistence(browserSessionPersistence);
|
|
@@ -44,6 +44,9 @@ export declare class PhoneMultiFactorGenerator {
|
|
|
44
44
|
/**
|
|
45
45
|
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
|
|
46
46
|
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* This method does not work in a Node.js environment.
|
|
49
|
+
*
|
|
47
50
|
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
|
|
48
51
|
* @returns A {@link PhoneMultiFactorAssertion} which can be used with
|
|
49
52
|
* {@link MultiFactorResolver.resolveSignIn}
|
|
@@ -19,6 +19,9 @@ import { PopupRedirectResolver } from '../model/public_types';
|
|
|
19
19
|
* An implementation of {@link PopupRedirectResolver} suitable for browser
|
|
20
20
|
* based applications.
|
|
21
21
|
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* This method does not work in a Node.js environment.
|
|
24
|
+
*
|
|
22
25
|
* @public
|
|
23
26
|
*/
|
|
24
27
|
export declare const browserPopupRedirectResolver: PopupRedirectResolver;
|
|
@@ -21,6 +21,9 @@ import { FirebaseError } from '@firebase/util';
|
|
|
21
21
|
/**
|
|
22
22
|
* Provider for generating an {@link PhoneAuthCredential}.
|
|
23
23
|
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* `PhoneAuthProvider` does not work in a Node.js environment.
|
|
26
|
+
*
|
|
24
27
|
* @example
|
|
25
28
|
* ```javascript
|
|
26
29
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -21,6 +21,9 @@ export declare const RECAPTCHA_VERIFIER_TYPE = "recaptcha";
|
|
|
21
21
|
/**
|
|
22
22
|
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
|
|
23
23
|
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* `RecaptchaVerifier` does not work in a Node.js environment.
|
|
26
|
+
*
|
|
24
27
|
* @public
|
|
25
28
|
*/
|
|
26
29
|
export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
@@ -33,6 +33,8 @@ import { AuthInternal } from '../../model/auth';
|
|
|
33
33
|
* {@link RecaptchaVerifier} (like React Native), but you need to use a
|
|
34
34
|
* third-party {@link ApplicationVerifier} implementation.
|
|
35
35
|
*
|
|
36
|
+
* This method does not work in a Node.js environment.
|
|
37
|
+
*
|
|
36
38
|
* @example
|
|
37
39
|
* ```javascript
|
|
38
40
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -52,6 +54,9 @@ export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, a
|
|
|
52
54
|
/**
|
|
53
55
|
* Links the user account with the given phone number.
|
|
54
56
|
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* This method does not work in a Node.js environment.
|
|
59
|
+
*
|
|
55
60
|
* @param user - The user.
|
|
56
61
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
57
62
|
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
@@ -62,7 +67,10 @@ export declare function linkWithPhoneNumber(user: User, phoneNumber: string, app
|
|
|
62
67
|
/**
|
|
63
68
|
* Re-authenticates a user using a fresh phone credential.
|
|
64
69
|
*
|
|
65
|
-
* @remarks
|
|
70
|
+
* @remarks
|
|
71
|
+
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
|
|
72
|
+
*
|
|
73
|
+
* This method does not work in a Node.js environment.
|
|
66
74
|
*
|
|
67
75
|
* @param user - The user.
|
|
68
76
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
@@ -79,6 +87,9 @@ export declare function _verifyPhoneNumber(auth: AuthInternal, options: PhoneInf
|
|
|
79
87
|
/**
|
|
80
88
|
* Updates the user's phone number.
|
|
81
89
|
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* This method does not work in a Node.js environment.
|
|
92
|
+
*
|
|
82
93
|
* @example
|
|
83
94
|
* ```
|
|
84
95
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -27,6 +27,8 @@ export declare const _POLL_WINDOW_CLOSE_TIMEOUT: Delay;
|
|
|
27
27
|
* If succeeds, returns the signed in user along with the provider's credential. If sign in was
|
|
28
28
|
* unsuccessful, returns an error object containing additional information about the error.
|
|
29
29
|
*
|
|
30
|
+
* This method does not work in a Node.js environment.
|
|
31
|
+
*
|
|
30
32
|
* @example
|
|
31
33
|
* ```javascript
|
|
32
34
|
* // Sign in using a popup.
|
|
@@ -46,7 +48,6 @@ export declare const _POLL_WINDOW_CLOSE_TIMEOUT: Delay;
|
|
|
46
48
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
47
49
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
48
50
|
*
|
|
49
|
-
*
|
|
50
51
|
* @public
|
|
51
52
|
*/
|
|
52
53
|
export declare function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
@@ -58,6 +59,8 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
58
59
|
* If the reauthentication is successful, the returned result will contain the user and the
|
|
59
60
|
* provider's credential.
|
|
60
61
|
*
|
|
62
|
+
* This method does not work in a Node.js environment.
|
|
63
|
+
*
|
|
61
64
|
* @example
|
|
62
65
|
* ```javascript
|
|
63
66
|
* // Sign in using a popup.
|
|
@@ -82,6 +85,7 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
82
85
|
* @remarks
|
|
83
86
|
* If the linking is successful, the returned result will contain the user and the provider's credential.
|
|
84
87
|
*
|
|
88
|
+
* This method does not work in a Node.js environment.
|
|
85
89
|
*
|
|
86
90
|
* @example
|
|
87
91
|
* ```javascript
|
|
@@ -23,6 +23,8 @@ import { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from
|
|
|
23
23
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
24
24
|
* | best practices} when using {@link signInWithRedirect}.
|
|
25
25
|
*
|
|
26
|
+
* This method does not work in a Node.js environment.
|
|
27
|
+
*
|
|
26
28
|
* @example
|
|
27
29
|
* ```javascript
|
|
28
30
|
* // Sign in using a redirect.
|
|
@@ -65,6 +67,8 @@ export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider,
|
|
|
65
67
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
66
68
|
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
67
69
|
*
|
|
70
|
+
* This method does not work in a Node.js environment.
|
|
71
|
+
*
|
|
68
72
|
* @example
|
|
69
73
|
* ```javascript
|
|
70
74
|
* // Sign in using a redirect.
|
|
@@ -99,6 +103,8 @@ export declare function _reauthenticateWithRedirect(user: User, provider: AuthPr
|
|
|
99
103
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
100
104
|
* | best practices} when using {@link linkWithRedirect}.
|
|
101
105
|
*
|
|
106
|
+
* This method does not work in a Node.js environment.
|
|
107
|
+
*
|
|
102
108
|
* @example
|
|
103
109
|
* ```javascript
|
|
104
110
|
* // Sign in using some other provider.
|
|
@@ -118,7 +124,6 @@ export declare function _reauthenticateWithRedirect(user: User, provider: AuthPr
|
|
|
118
124
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
119
125
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
120
126
|
*
|
|
121
|
-
*
|
|
122
127
|
* @public
|
|
123
128
|
*/
|
|
124
129
|
export declare function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
|
|
@@ -130,6 +135,8 @@ export declare function _linkWithRedirect(user: User, provider: AuthProvider, re
|
|
|
130
135
|
* If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an
|
|
131
136
|
* error. If no redirect operation was called, returns `null`.
|
|
132
137
|
*
|
|
138
|
+
* This method does not work in a Node.js environment.
|
|
139
|
+
*
|
|
133
140
|
* @example
|
|
134
141
|
* ```javascript
|
|
135
142
|
* // Sign in using a redirect.
|
|
@@ -20,4 +20,5 @@ export declare function getTestInstance(requireEmulator?: boolean): Auth;
|
|
|
20
20
|
export declare function cleanUpTestInstance(auth: Auth): Promise<void>;
|
|
21
21
|
export declare function getTotpCode(sharedSecretKey: string, periodSec: number, verificationCodeLength: number, timestamp: Date): string;
|
|
22
22
|
export declare const email = "totpuser-donotdelete@test.com";
|
|
23
|
+
export declare const fakePassword = "password";
|
|
23
24
|
export declare const incorrectTotpCode = "1000000";
|
|
@@ -549,7 +549,7 @@ function _initializeAuthInstance(auth, deps) {
|
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
var name = "@firebase/auth";
|
|
552
|
-
var version = "0.23.2-canary.
|
|
552
|
+
var version = "0.23.2-canary.e522056fc";
|
|
553
553
|
|
|
554
554
|
/**
|
|
555
555
|
* @license
|
|
@@ -8189,6 +8189,8 @@ function getAdditionalUserInfo(userCredential) {
|
|
|
8189
8189
|
* remembered or not. It also makes it easier to never persist the `Auth` state for applications
|
|
8190
8190
|
* that are shared by other users or have sensitive data.
|
|
8191
8191
|
*
|
|
8192
|
+
* This method does not work in a Node.js environment.
|
|
8193
|
+
*
|
|
8192
8194
|
* @example
|
|
8193
8195
|
* ```javascript
|
|
8194
8196
|
* setPersistence(auth, browserSessionPersistence);
|
|
@@ -8219,6 +8221,8 @@ function setPersistence(auth, persistence) {
|
|
|
8219
8221
|
* Thus, by calling this optional method, you will reduce the latency of future auth flows.
|
|
8220
8222
|
* Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
|
|
8221
8223
|
*
|
|
8224
|
+
* This method does not work in a Node.js environment.
|
|
8225
|
+
*
|
|
8222
8226
|
* @example
|
|
8223
8227
|
* ```javascript
|
|
8224
8228
|
* initializeRecaptchaConfig(auth);
|
|
@@ -8343,14 +8347,30 @@ function deleteUser(user) {
|
|
|
8343
8347
|
});
|
|
8344
8348
|
}
|
|
8345
8349
|
|
|
8350
|
+
/**
|
|
8351
|
+
* @license
|
|
8352
|
+
* Copyright 2020 Google LLC
|
|
8353
|
+
*
|
|
8354
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8355
|
+
* you may not use this file except in compliance with the License.
|
|
8356
|
+
* You may obtain a copy of the License at
|
|
8357
|
+
*
|
|
8358
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8359
|
+
*
|
|
8360
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8361
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8362
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8363
|
+
* See the License for the specific language governing permissions and
|
|
8364
|
+
* limitations under the License.
|
|
8365
|
+
*/
|
|
8346
8366
|
var MultiFactorSessionImpl = /** @class */ (function () {
|
|
8347
|
-
function MultiFactorSessionImpl(type, credential,
|
|
8367
|
+
function MultiFactorSessionImpl(type, credential, user) {
|
|
8348
8368
|
this.type = type;
|
|
8349
8369
|
this.credential = credential;
|
|
8350
|
-
this.
|
|
8370
|
+
this.user = user;
|
|
8351
8371
|
}
|
|
8352
|
-
MultiFactorSessionImpl._fromIdtoken = function (idToken,
|
|
8353
|
-
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken,
|
|
8372
|
+
MultiFactorSessionImpl._fromIdtoken = function (idToken, user) {
|
|
8373
|
+
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
|
|
8354
8374
|
};
|
|
8355
8375
|
MultiFactorSessionImpl._fromMfaPendingCredential = function (mfaPendingCredential) {
|
|
8356
8376
|
return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
|
|
@@ -8522,7 +8542,7 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
8522
8542
|
case 0:
|
|
8523
8543
|
_b = (_a = MultiFactorSessionImpl)._fromIdtoken;
|
|
8524
8544
|
return [4 /*yield*/, this.user.getIdToken()];
|
|
8525
|
-
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user
|
|
8545
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user])];
|
|
8526
8546
|
}
|
|
8527
8547
|
});
|
|
8528
8548
|
});
|