@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
package/dist/node/index.doc.d.ts
CHANGED
package/dist/node/index.js
CHANGED
package/dist/node/index.rn.d.ts
CHANGED
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* This is the file that people using React Native will actually import. You
|
|
19
|
+
* should only include this file if you have something specific about your
|
|
20
|
+
* implementation that mandates having a separate entrypoint. Otherwise you can
|
|
21
|
+
* just use index.ts
|
|
22
|
+
*/
|
|
17
23
|
import { FirebaseApp } from '@firebase/app';
|
|
18
|
-
import { Auth
|
|
24
|
+
import { Auth } from './src/model/public_types';
|
|
19
25
|
import { getReactNativePersistence } from './src/platform_react_native/persistence/react_native';
|
|
20
26
|
export * from './index.shared';
|
|
21
27
|
export { PhoneAuthProvider } from './src/platform_browser/providers/phone';
|
|
22
28
|
export { signInWithPhoneNumber, linkWithPhoneNumber, reauthenticateWithPhoneNumber, updatePhoneNumber } from './src/platform_browser/strategies/phone';
|
|
23
29
|
export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
|
|
24
|
-
/**
|
|
25
|
-
* An implementation of {@link Persistence} of type 'LOCAL' for use in React
|
|
26
|
-
* Native environments.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare const reactNativeLocalPersistence: Persistence;
|
|
31
30
|
export { getReactNativePersistence };
|
|
32
31
|
export declare function getAuth(app?: FirebaseApp): Auth;
|
package/dist/node/internal.js
CHANGED
|
@@ -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";
|
|
@@ -7333,14 +7333,30 @@ function deleteUser(user) {
|
|
|
7333
7333
|
});
|
|
7334
7334
|
}
|
|
7335
7335
|
|
|
7336
|
+
/**
|
|
7337
|
+
* @license
|
|
7338
|
+
* Copyright 2020 Google LLC
|
|
7339
|
+
*
|
|
7340
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7341
|
+
* you may not use this file except in compliance with the License.
|
|
7342
|
+
* You may obtain a copy of the License at
|
|
7343
|
+
*
|
|
7344
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7345
|
+
*
|
|
7346
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7347
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7348
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7349
|
+
* See the License for the specific language governing permissions and
|
|
7350
|
+
* limitations under the License.
|
|
7351
|
+
*/
|
|
7336
7352
|
var MultiFactorSessionImpl = /** @class */ (function () {
|
|
7337
|
-
function MultiFactorSessionImpl(type, credential,
|
|
7353
|
+
function MultiFactorSessionImpl(type, credential, user) {
|
|
7338
7354
|
this.type = type;
|
|
7339
7355
|
this.credential = credential;
|
|
7340
|
-
this.
|
|
7356
|
+
this.user = user;
|
|
7341
7357
|
}
|
|
7342
|
-
MultiFactorSessionImpl._fromIdtoken = function (idToken,
|
|
7343
|
-
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken,
|
|
7358
|
+
MultiFactorSessionImpl._fromIdtoken = function (idToken, user) {
|
|
7359
|
+
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
|
|
7344
7360
|
};
|
|
7345
7361
|
MultiFactorSessionImpl._fromMfaPendingCredential = function (mfaPendingCredential) {
|
|
7346
7362
|
return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
|
|
@@ -7518,7 +7534,7 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
7518
7534
|
case 0:
|
|
7519
7535
|
_b = (_a = MultiFactorSessionImpl)._fromIdtoken;
|
|
7520
7536
|
return [4 /*yield*/, this.user.getIdToken()];
|
|
7521
|
-
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user
|
|
7537
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user])];
|
|
7522
7538
|
}
|
|
7523
7539
|
});
|
|
7524
7540
|
});
|
|
@@ -7620,7 +7636,7 @@ function multiFactor(user) {
|
|
|
7620
7636
|
}
|
|
7621
7637
|
|
|
7622
7638
|
var name = "@firebase/auth";
|
|
7623
|
-
var version = "0.23.2-canary.
|
|
7639
|
+
var version = "0.23.2-canary.f1c8d3806";
|
|
7624
7640
|
|
|
7625
7641
|
/**
|
|
7626
7642
|
* @license
|
|
@@ -7950,20 +7966,21 @@ var TotpMultiFactorGenerator = /** @class */ (function () {
|
|
|
7950
7966
|
* @returns A promise to {@link TotpSecret}.
|
|
7951
7967
|
*/
|
|
7952
7968
|
TotpMultiFactorGenerator.generateSecret = function (session) {
|
|
7969
|
+
var _a;
|
|
7953
7970
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
7954
7971
|
var mfaSession, response;
|
|
7955
|
-
return tslib.__generator(this, function (
|
|
7956
|
-
switch (
|
|
7972
|
+
return tslib.__generator(this, function (_b) {
|
|
7973
|
+
switch (_b.label) {
|
|
7957
7974
|
case 0:
|
|
7958
7975
|
mfaSession = session;
|
|
7959
|
-
_assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
7960
|
-
return [4 /*yield*/, startEnrollTotpMfa(mfaSession.auth, {
|
|
7976
|
+
_assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
7977
|
+
return [4 /*yield*/, startEnrollTotpMfa(mfaSession.user.auth, {
|
|
7961
7978
|
idToken: mfaSession.credential,
|
|
7962
7979
|
totpEnrollmentInfo: {}
|
|
7963
7980
|
})];
|
|
7964
7981
|
case 1:
|
|
7965
|
-
response =
|
|
7966
|
-
return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth)];
|
|
7982
|
+
response = _b.sent();
|
|
7983
|
+
return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth)];
|
|
7967
7984
|
}
|
|
7968
7985
|
});
|
|
7969
7986
|
});
|
|
@@ -8189,4 +8206,4 @@ exports.updateProfile = updateProfile;
|
|
|
8189
8206
|
exports.useDeviceLanguage = useDeviceLanguage;
|
|
8190
8207
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
8191
8208
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
8192
|
-
//# sourceMappingURL=totp-
|
|
8209
|
+
//# sourceMappingURL=totp-ea92812c.js.map
|