@firebase/auth 0.20.6 → 0.20.7-20220914164443
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 +8 -0
- package/dist/auth-public.d.ts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +4 -4
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-a23784e6.js → popup_redirect-e7a40390.js} +9 -8
- package/dist/cordova/popup_redirect-e7a40390.js.map +1 -0
- package/dist/cordova/src/api/index.d.ts +4 -4
- package/dist/cordova/src/mfa/mfa_session.d.ts +3 -1
- package/dist/cordova/src/model/public_types.d.ts +1 -1
- package/dist/esm2017/{index-6bd8d405.js → index-99470500.js} +11 -10
- package/dist/esm2017/index-99470500.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/index.d.ts +4 -4
- package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -1
- package/dist/esm2017/src/model/public_types.d.ts +1 -1
- package/dist/esm5/{index-0bcd930a.js → index-c10649cd.js} +11 -10
- package/dist/esm5/index-c10649cd.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/index.d.ts +4 -4
- package/dist/esm5/src/mfa/mfa_session.d.ts +3 -1
- package/dist/esm5/src/model/public_types.d.ts +1 -1
- package/dist/index.webworker.esm5.js +6 -5
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-5a9d0579.js → index-75a37629.js} +7 -6
- package/dist/node/index-75a37629.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/api/index.d.ts +4 -4
- package/dist/node/src/mfa/mfa_session.d.ts +3 -1
- package/dist/node/src/model/public_types.d.ts +1 -1
- package/dist/node-esm/{index-f3a96a92.js → index-0b30c0a9.js} +7 -6
- package/dist/node-esm/index-0b30c0a9.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/api/index.d.ts +4 -4
- package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -1
- package/dist/node-esm/src/model/public_types.d.ts +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/{phone-54e6b3d3.js → phone-e6063adc.js} +11 -10
- package/dist/rn/phone-e6063adc.js.map +1 -0
- package/dist/rn/src/api/index.d.ts +4 -4
- package/dist/rn/src/mfa/mfa_session.d.ts +3 -1
- package/dist/rn/src/model/public_types.d.ts +1 -1
- package/dist/src/api/index.d.ts +4 -4
- package/dist/src/mfa/mfa_session.d.ts +3 -1
- package/dist/src/model/public_types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cordova/popup_redirect-a23784e6.js.map +0 -1
- package/dist/esm2017/index-6bd8d405.js.map +0 -1
- package/dist/esm5/index-0bcd930a.js.map +0 -1
- package/dist/node/index-5a9d0579.js.map +0 -1
- package/dist/node-esm/index-f3a96a92.js.map +0 -1
- package/dist/rn/phone-54e6b3d3.js.map +0 -1
|
@@ -46,10 +46,10 @@ export declare const enum Endpoint {
|
|
|
46
46
|
SET_ACCOUNT_INFO = "/v1/accounts:update",
|
|
47
47
|
GET_ACCOUNT_INFO = "/v1/accounts:lookup",
|
|
48
48
|
GET_RECAPTCHA_PARAM = "/v1/recaptchaParams",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
START_MFA_ENROLLMENT = "/v2/accounts/mfaEnrollment:start",
|
|
50
|
+
FINALIZE_MFA_ENROLLMENT = "/v2/accounts/mfaEnrollment:finalize",
|
|
51
|
+
START_MFA_SIGN_IN = "/v2/accounts/mfaSignIn:start",
|
|
52
|
+
FINALIZE_MFA_SIGN_IN = "/v2/accounts/mfaSignIn:finalize",
|
|
53
53
|
WITHDRAW_MFA = "/v2/accounts/mfaEnrollment:withdraw",
|
|
54
54
|
GET_PROJECT_CONFIG = "/v1/projects"
|
|
55
55
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { AuthInternal } from '../model/auth';
|
|
17
18
|
import { MultiFactorSession } from '../model/public_types';
|
|
18
19
|
export declare const enum MultiFactorSessionType {
|
|
19
20
|
ENROLL = "enroll",
|
|
@@ -28,8 +29,9 @@ interface SerializedMultiFactorSession {
|
|
|
28
29
|
export declare class MultiFactorSessionImpl implements MultiFactorSession {
|
|
29
30
|
readonly type: MultiFactorSessionType;
|
|
30
31
|
readonly credential: string;
|
|
32
|
+
readonly auth?: AuthInternal | undefined;
|
|
31
33
|
private constructor();
|
|
32
|
-
static _fromIdtoken(idToken: string): MultiFactorSessionImpl;
|
|
34
|
+
static _fromIdtoken(idToken: string, auth?: AuthInternal): MultiFactorSessionImpl;
|
|
33
35
|
static _fromMfaPendingCredential(mfaPendingCredential: string): MultiFactorSessionImpl;
|
|
34
36
|
toJSON(): SerializedMultiFactorSession;
|
|
35
37
|
static fromJSON(obj: Partial<SerializedMultiFactorSession>): MultiFactorSessionImpl | null;
|
|
@@ -5777,12 +5777,13 @@ async function deleteUser(user) {
|
|
|
5777
5777
|
}
|
|
5778
5778
|
|
|
5779
5779
|
class MultiFactorSessionImpl {
|
|
5780
|
-
constructor(type, credential) {
|
|
5780
|
+
constructor(type, credential, auth) {
|
|
5781
5781
|
this.type = type;
|
|
5782
5782
|
this.credential = credential;
|
|
5783
|
+
this.auth = auth;
|
|
5783
5784
|
}
|
|
5784
|
-
static _fromIdtoken(idToken) {
|
|
5785
|
-
return new MultiFactorSessionImpl("enroll" /* ENROLL */, idToken);
|
|
5785
|
+
static _fromIdtoken(idToken, auth) {
|
|
5786
|
+
return new MultiFactorSessionImpl("enroll" /* ENROLL */, idToken, auth);
|
|
5786
5787
|
}
|
|
5787
5788
|
static _fromMfaPendingCredential(mfaPendingCredential) {
|
|
5788
5789
|
return new MultiFactorSessionImpl("signin" /* SIGN_IN */, mfaPendingCredential);
|
|
@@ -5902,10 +5903,10 @@ function getMultiFactorResolver(auth, error) {
|
|
|
5902
5903
|
* limitations under the License.
|
|
5903
5904
|
*/
|
|
5904
5905
|
function startEnrollPhoneMfa(auth, request) {
|
|
5905
|
-
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaEnrollment:start" /*
|
|
5906
|
+
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaEnrollment:start" /* START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));
|
|
5906
5907
|
}
|
|
5907
5908
|
function finalizeEnrollPhoneMfa(auth, request) {
|
|
5908
|
-
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaEnrollment:finalize" /*
|
|
5909
|
+
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaEnrollment:finalize" /* FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));
|
|
5909
5910
|
}
|
|
5910
5911
|
function withdrawMfa(auth, request) {
|
|
5911
5912
|
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaEnrollment:withdraw" /* WITHDRAW_MFA */, _addTidIfNecessary(auth, request));
|
|
@@ -5925,7 +5926,7 @@ class MultiFactorUserImpl {
|
|
|
5925
5926
|
return new MultiFactorUserImpl(user);
|
|
5926
5927
|
}
|
|
5927
5928
|
async getSession() {
|
|
5928
|
-
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken());
|
|
5929
|
+
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user.auth);
|
|
5929
5930
|
}
|
|
5930
5931
|
async enroll(assertionExtern, displayName) {
|
|
5931
5932
|
const assertion = assertionExtern;
|
|
@@ -7001,10 +7002,10 @@ const indexedDBLocalPersistence = IndexedDBLocalPersistence;
|
|
|
7001
7002
|
* limitations under the License.
|
|
7002
7003
|
*/
|
|
7003
7004
|
function startSignInPhoneMfa(auth, request) {
|
|
7004
|
-
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaSignIn:start" /*
|
|
7005
|
+
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaSignIn:start" /* START_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));
|
|
7005
7006
|
}
|
|
7006
7007
|
function finalizeSignInPhoneMfa(auth, request) {
|
|
7007
|
-
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaSignIn:finalize" /*
|
|
7008
|
+
return _performApiRequest(auth, "POST" /* POST */, "/v2/accounts/mfaSignIn:finalize" /* FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));
|
|
7008
7009
|
}
|
|
7009
7010
|
|
|
7010
7011
|
/**
|
|
@@ -9295,7 +9296,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9295
9296
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9296
9297
|
|
|
9297
9298
|
var name = "@firebase/auth";
|
|
9298
|
-
var version = "0.20.
|
|
9299
|
+
var version = "0.20.7-20220914164443";
|
|
9299
9300
|
|
|
9300
9301
|
/**
|
|
9301
9302
|
* @license
|
|
@@ -9486,4 +9487,4 @@ function getAuth(app = getApp()) {
|
|
|
9486
9487
|
registerAuth("Browser" /* BROWSER */);
|
|
9487
9488
|
|
|
9488
9489
|
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, AuthEventManager as aA, _getRedirectResult as aB, _overrideRedirectResult as aC, _clearRedirectOutcomes 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, _isIOS7Or8 as ap, debugAssert as aq, _isIOS as ar, _isAndroid as as, _fail as at, _getRedirectUrl as au, _getProjectConfig as av, _createError as aw, _assert as ax, _getInstance as ay, _persistenceKeyName 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 };
|
|
9489
|
-
//# sourceMappingURL=index-
|
|
9490
|
+
//# sourceMappingURL=index-99470500.js.map
|