@firebase/auth 0.23.2-canary.e642fc7cd → 0.23.2-canary.f1c8d3806
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 +3 -4
- package/dist/auth.d.ts +3 -4
- package/dist/browser-cjs/{index-35a8d5c2.js → index-cbaaa869.js} +29 -13
- package/dist/browser-cjs/index-cbaaa869.js.map +1 -0
- package/dist/browser-cjs/index.doc.d.ts +1 -1
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/index.rn.d.ts +7 -8
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/mfa/mfa_session.d.ts +3 -3
- package/dist/browser-cjs/src/model/public_types.d.ts +1 -1
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/cordova/index.doc.d.ts +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/index.rn.d.ts +7 -8
- package/dist/cordova/internal.js +11 -11
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-e88eb743.js → popup_redirect-0c43a717.js} +23 -7
- package/dist/cordova/{popup_redirect-e88eb743.js.map → popup_redirect-0c43a717.js.map} +1 -1
- package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
- package/dist/cordova/src/model/public_types.d.ts +1 -1
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/cordova/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm2017/{index-14ccc5f3.js → index-2e66d7ed.js} +29 -13
- package/dist/esm2017/index-2e66d7ed.js.map +1 -0
- package/dist/esm2017/index.doc.d.ts +1 -1
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/index.rn.d.ts +7 -8
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm2017/src/model/public_types.d.ts +1 -1
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/esm2017/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm5/{index-f5d14f2f.js → index-72cf0233.js} +32 -16
- package/dist/esm5/index-72cf0233.js.map +1 -0
- package/dist/esm5/index.doc.d.ts +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/index.rn.d.ts +7 -8
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm5/src/model/public_types.d.ts +1 -1
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/esm5/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/index.doc.d.ts +1 -1
- package/dist/index.rn.d.ts +7 -8
- package/dist/index.webworker.esm5.js +22 -6
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.doc.d.ts +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.rn.d.ts +7 -8
- package/dist/node/internal.js +1 -1
- package/dist/node/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node/src/model/public_types.d.ts +1 -1
- package/dist/node/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/node/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node/{totp-0ccc129a.js → totp-ea92812c.js} +30 -13
- package/dist/node/{totp-0ccc129a.js.map → totp-ea92812c.js.map} +1 -1
- package/dist/node-esm/index.doc.d.ts +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/index.rn.d.ts +7 -8
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node-esm/src/model/public_types.d.ts +1 -1
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/node-esm/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node-esm/{totp-d6b703d1.js → totp-c453433c.js} +27 -10
- package/dist/node-esm/{totp-d6b703d1.js.map → totp-c453433c.js.map} +1 -1
- package/dist/rn/index.doc.d.ts +1 -1
- package/dist/rn/index.js +5 -57
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/index.rn.d.ts +7 -8
- package/dist/rn/internal.js +8 -7
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-a8d96168.js → phone-52a61d69.js} +25 -10
- package/dist/rn/{phone-a8d96168.js.map → phone-52a61d69.js.map} +1 -1
- package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
- package/dist/rn/src/model/public_types.d.ts +1 -1
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/rn/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/src/mfa/mfa_session.d.ts +3 -3
- package/dist/src/model/public_types.d.ts +1 -1
- package/dist/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
- package/dist/test/helpers/integration/helpers.d.ts +1 -0
- package/package.json +10 -9
- package/dist/browser-cjs/index-35a8d5c2.js.map +0 -1
- package/dist/esm2017/index-14ccc5f3.js.map +0 -1
- package/dist/esm5/index-f5d14f2f.js.map +0 -1
|
@@ -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;
|
|
@@ -46,6 +46,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
46
46
|
readonly _recaptchaLoader: ReCaptchaLoader;
|
|
47
47
|
private recaptcha;
|
|
48
48
|
/**
|
|
49
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
49
50
|
*
|
|
50
51
|
* @param containerOrId - The reCAPTCHA container parameter.
|
|
51
52
|
*
|
|
@@ -62,10 +63,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
62
63
|
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
63
64
|
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
64
65
|
* 'invisible'.
|
|
65
|
-
*
|
|
66
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
67
66
|
*/
|
|
68
|
-
constructor(containerOrId: HTMLElement | string, parameters
|
|
67
|
+
constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
|
|
69
68
|
/**
|
|
70
69
|
* Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
|
|
71
70
|
*
|
|
@@ -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 password = "password";
|
|
23
24
|
export declare const incorrectTotpCode = "1000000";
|
|
@@ -6219,14 +6219,30 @@ async function deleteUser(user) {
|
|
|
6219
6219
|
return getModularInstance(user).delete();
|
|
6220
6220
|
}
|
|
6221
6221
|
|
|
6222
|
+
/**
|
|
6223
|
+
* @license
|
|
6224
|
+
* Copyright 2020 Google LLC
|
|
6225
|
+
*
|
|
6226
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6227
|
+
* you may not use this file except in compliance with the License.
|
|
6228
|
+
* You may obtain a copy of the License at
|
|
6229
|
+
*
|
|
6230
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6231
|
+
*
|
|
6232
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6233
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6234
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6235
|
+
* See the License for the specific language governing permissions and
|
|
6236
|
+
* limitations under the License.
|
|
6237
|
+
*/
|
|
6222
6238
|
class MultiFactorSessionImpl {
|
|
6223
|
-
constructor(type, credential,
|
|
6239
|
+
constructor(type, credential, user) {
|
|
6224
6240
|
this.type = type;
|
|
6225
6241
|
this.credential = credential;
|
|
6226
|
-
this.
|
|
6242
|
+
this.user = user;
|
|
6227
6243
|
}
|
|
6228
|
-
static _fromIdtoken(idToken,
|
|
6229
|
-
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken,
|
|
6244
|
+
static _fromIdtoken(idToken, user) {
|
|
6245
|
+
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
|
|
6230
6246
|
}
|
|
6231
6247
|
static _fromMfaPendingCredential(mfaPendingCredential) {
|
|
6232
6248
|
return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
|
|
@@ -6375,7 +6391,7 @@ class MultiFactorUserImpl {
|
|
|
6375
6391
|
return new MultiFactorUserImpl(user);
|
|
6376
6392
|
}
|
|
6377
6393
|
async getSession() {
|
|
6378
|
-
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user
|
|
6394
|
+
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);
|
|
6379
6395
|
}
|
|
6380
6396
|
async enroll(assertionExtern, displayName) {
|
|
6381
6397
|
const assertion = assertionExtern;
|
|
@@ -7719,6 +7735,7 @@ const DEFAULT_PARAMS = {
|
|
|
7719
7735
|
*/
|
|
7720
7736
|
class RecaptchaVerifier {
|
|
7721
7737
|
/**
|
|
7738
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
7722
7739
|
*
|
|
7723
7740
|
* @param containerOrId - The reCAPTCHA container parameter.
|
|
7724
7741
|
*
|
|
@@ -7735,10 +7752,8 @@ class RecaptchaVerifier {
|
|
|
7735
7752
|
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
7736
7753
|
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
7737
7754
|
* 'invisible'.
|
|
7738
|
-
*
|
|
7739
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
7740
7755
|
*/
|
|
7741
|
-
constructor(containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)
|
|
7756
|
+
constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
|
|
7742
7757
|
this.parameters = parameters;
|
|
7743
7758
|
/**
|
|
7744
7759
|
* The application verifier type.
|
|
@@ -9795,13 +9810,14 @@ class TotpMultiFactorGenerator {
|
|
|
9795
9810
|
* @returns A promise to {@link TotpSecret}.
|
|
9796
9811
|
*/
|
|
9797
9812
|
static async generateSecret(session) {
|
|
9813
|
+
var _a;
|
|
9798
9814
|
const mfaSession = session;
|
|
9799
|
-
_assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
9800
|
-
const response = await startEnrollTotpMfa(mfaSession.auth, {
|
|
9815
|
+
_assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
9816
|
+
const response = await startEnrollTotpMfa(mfaSession.user.auth, {
|
|
9801
9817
|
idToken: mfaSession.credential,
|
|
9802
9818
|
totpEnrollmentInfo: {}
|
|
9803
9819
|
});
|
|
9804
|
-
return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
|
|
9820
|
+
return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
|
|
9805
9821
|
}
|
|
9806
9822
|
}
|
|
9807
9823
|
/**
|
|
@@ -9902,7 +9918,7 @@ function _isEmptyString(input) {
|
|
|
9902
9918
|
}
|
|
9903
9919
|
|
|
9904
9920
|
var name = "@firebase/auth";
|
|
9905
|
-
var version = "0.23.2-canary.
|
|
9921
|
+
var version = "0.23.2-canary.f1c8d3806";
|
|
9906
9922
|
|
|
9907
9923
|
/**
|
|
9908
9924
|
* @license
|
|
@@ -10123,4 +10139,4 @@ function getAuth(app = getApp()) {
|
|
|
10123
10139
|
registerAuth("Browser" /* ClientPlatform.BROWSER */);
|
|
10124
10140
|
|
|
10125
10141
|
export { signInWithCredential as $, ActionCodeOperation as A, signOut as B, deleteUser as C, debugErrorMap as D, prodErrorMap as E, FactorId as F, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as G, initializeAuth as H, connectAuthEmulator as I, AuthCredential as J, EmailAuthCredential as K, OAuthCredential as L, PhoneAuthCredential as M, inMemoryPersistence as N, OperationType as O, PhoneAuthProvider as P, EmailAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, FacebookAuthProvider as U, GoogleAuthProvider as V, GithubAuthProvider as W, OAuthProvider as X, SAMLAuthProvider as Y, TwitterAuthProvider as Z, signInAnonymously as _, browserSessionPersistence as a, linkWithCredential as a0, reauthenticateWithCredential as a1, signInWithCustomToken as a2, sendPasswordResetEmail as a3, confirmPasswordReset as a4, applyActionCode as a5, checkActionCode as a6, verifyPasswordResetCode as a7, createUserWithEmailAndPassword as a8, signInWithEmailAndPassword as a9, _assert as aA, AuthEventManager as aB, _getInstance as aC, _persistenceKeyName as aD, _getRedirectResult as aE, _overrideRedirectResult as aF, _clearRedirectOutcomes as aG, _castAuth as aH, UserImpl as aI, AuthImpl as aJ, _getClientVersion as aK, _generateEventId as aL, AuthPopup as aM, FetchProvider as aN, SAMLAuthCredential as aO, sendSignInLinkToEmail as aa, isSignInWithEmailLink as ab, signInWithEmailLink as ac, fetchSignInMethodsForEmail as ad, sendEmailVerification as ae, verifyBeforeUpdateEmail as af, ActionCodeURL as ag, parseActionCodeURL as ah, updateProfile as ai, updateEmail as aj, updatePassword as ak, getIdToken as al, getIdTokenResult as am, unlink as an, getAdditionalUserInfo as ao, reload as ap, getMultiFactorResolver as aq, multiFactor as ar, debugAssert as as, _isIOS as at, _isAndroid as au, _fail as av, _getRedirectUrl as aw, _getProjectConfig as ax, _isIOS7Or8 as ay, _createError 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, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, onIdTokenChanged as v, beforeAuthStateChanged as w, onAuthStateChanged as x, useDeviceLanguage as y, updateCurrentUser as z };
|
|
10126
|
-
//# sourceMappingURL=index-
|
|
10142
|
+
//# sourceMappingURL=index-2e66d7ed.js.map
|