@firebase/auth 0.21.5 → 0.21.6-canary.45a55330e

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.
Files changed (144) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +25 -0
  3. package/dist/auth-public.d.ts +135 -4
  4. package/dist/auth.d.ts +138 -4
  5. package/dist/browser-cjs/{index-ff477525.js → index-3e63d976.js} +180 -5
  6. package/dist/browser-cjs/index-3e63d976.js.map +1 -0
  7. package/dist/browser-cjs/index.d.ts +2 -1
  8. package/dist/browser-cjs/index.js +3 -1
  9. package/dist/browser-cjs/index.js.map +1 -1
  10. package/dist/browser-cjs/internal.js +3 -1
  11. package/dist/browser-cjs/internal.js.map +1 -1
  12. package/dist/browser-cjs/src/api/account_management/mfa.d.ts +38 -4
  13. package/dist/browser-cjs/src/api/authentication/mfa.d.ts +11 -0
  14. package/dist/browser-cjs/src/core/errors.d.ts +1 -0
  15. package/dist/browser-cjs/src/core/index.d.ts +1 -0
  16. package/dist/browser-cjs/src/mfa/assertions/totp.d.ts +124 -0
  17. package/dist/browser-cjs/src/mfa/assertions/totp.test.d.ts +17 -0
  18. package/dist/browser-cjs/src/mfa/mfa_info.d.ts +5 -1
  19. package/dist/browser-cjs/src/model/enum_maps.d.ts +1 -0
  20. package/dist/browser-cjs/src/model/public_types.d.ts +18 -1
  21. package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +3 -0
  22. package/dist/browser-cjs/test/integration/flows/totp.test.d.ts +17 -0
  23. package/dist/cordova/index.d.ts +2 -1
  24. package/dist/cordova/index.js +2 -2
  25. package/dist/cordova/internal.js +179 -3
  26. package/dist/cordova/internal.js.map +1 -1
  27. package/dist/cordova/{popup_redirect-a4d3c436.js → popup_redirect-4dd66477.js} +31 -6
  28. package/dist/cordova/popup_redirect-4dd66477.js.map +1 -0
  29. package/dist/cordova/src/api/account_management/mfa.d.ts +38 -4
  30. package/dist/cordova/src/api/authentication/mfa.d.ts +11 -0
  31. package/dist/cordova/src/core/errors.d.ts +1 -0
  32. package/dist/cordova/src/core/index.d.ts +1 -0
  33. package/dist/cordova/src/mfa/assertions/totp.d.ts +124 -0
  34. package/dist/cordova/src/mfa/assertions/totp.test.d.ts +17 -0
  35. package/dist/cordova/src/mfa/mfa_info.d.ts +5 -1
  36. package/dist/cordova/src/model/enum_maps.d.ts +1 -0
  37. package/dist/cordova/src/model/public_types.d.ts +18 -1
  38. package/dist/cordova/test/helpers/integration/helpers.d.ts +3 -0
  39. package/dist/cordova/test/integration/flows/totp.test.d.ts +17 -0
  40. package/dist/esm2017/{index-3363a72a.js → index-c8153924.js} +179 -6
  41. package/dist/esm2017/index-c8153924.js.map +1 -0
  42. package/dist/esm2017/index.d.ts +2 -1
  43. package/dist/esm2017/index.js +1 -1
  44. package/dist/esm2017/internal.js +2 -2
  45. package/dist/esm2017/src/api/account_management/mfa.d.ts +38 -4
  46. package/dist/esm2017/src/api/authentication/mfa.d.ts +11 -0
  47. package/dist/esm2017/src/core/errors.d.ts +1 -0
  48. package/dist/esm2017/src/core/index.d.ts +1 -0
  49. package/dist/esm2017/src/mfa/assertions/totp.d.ts +124 -0
  50. package/dist/esm2017/src/mfa/assertions/totp.test.d.ts +17 -0
  51. package/dist/esm2017/src/mfa/mfa_info.d.ts +5 -1
  52. package/dist/esm2017/src/model/enum_maps.d.ts +1 -0
  53. package/dist/esm2017/src/model/public_types.d.ts +18 -1
  54. package/dist/esm2017/test/helpers/integration/helpers.d.ts +3 -0
  55. package/dist/esm2017/test/integration/flows/totp.test.d.ts +17 -0
  56. package/dist/esm5/{index-3f05dc7b.js → index-f3279380.js} +207 -6
  57. package/dist/esm5/index-f3279380.js.map +1 -0
  58. package/dist/esm5/index.d.ts +2 -1
  59. package/dist/esm5/index.js +1 -1
  60. package/dist/esm5/internal.js +2 -2
  61. package/dist/esm5/src/api/account_management/mfa.d.ts +38 -4
  62. package/dist/esm5/src/api/authentication/mfa.d.ts +11 -0
  63. package/dist/esm5/src/core/errors.d.ts +1 -0
  64. package/dist/esm5/src/core/index.d.ts +1 -0
  65. package/dist/esm5/src/mfa/assertions/totp.d.ts +124 -0
  66. package/dist/esm5/src/mfa/assertions/totp.test.d.ts +17 -0
  67. package/dist/esm5/src/mfa/mfa_info.d.ts +5 -1
  68. package/dist/esm5/src/model/enum_maps.d.ts +1 -0
  69. package/dist/esm5/src/model/public_types.d.ts +18 -1
  70. package/dist/esm5/test/helpers/integration/helpers.d.ts +3 -0
  71. package/dist/esm5/test/integration/flows/totp.test.d.ts +17 -0
  72. package/dist/index.d.ts +2 -1
  73. package/dist/index.webworker.esm5.js +23 -4
  74. package/dist/index.webworker.esm5.js.map +1 -1
  75. package/dist/node/index.d.ts +2 -1
  76. package/dist/node/index.js +83 -81
  77. package/dist/node/index.js.map +1 -1
  78. package/dist/node/internal.js +144 -142
  79. package/dist/node/internal.js.map +1 -1
  80. package/dist/node/src/api/account_management/mfa.d.ts +38 -4
  81. package/dist/node/src/api/authentication/mfa.d.ts +11 -0
  82. package/dist/node/src/core/errors.d.ts +1 -0
  83. package/dist/node/src/core/index.d.ts +1 -0
  84. package/dist/node/src/mfa/assertions/totp.d.ts +124 -0
  85. package/dist/node/src/mfa/assertions/totp.test.d.ts +17 -0
  86. package/dist/node/src/mfa/mfa_info.d.ts +5 -1
  87. package/dist/node/src/model/enum_maps.d.ts +1 -0
  88. package/dist/node/src/model/public_types.d.ts +18 -1
  89. package/dist/node/test/helpers/integration/helpers.d.ts +3 -0
  90. package/dist/node/test/integration/flows/totp.test.d.ts +17 -0
  91. package/dist/node/{index-45468d80.js → totp-9c98f1ff.js} +243 -6
  92. package/dist/node/totp-9c98f1ff.js.map +1 -0
  93. package/dist/node-esm/index.d.ts +2 -1
  94. package/dist/node-esm/index.js +2 -2
  95. package/dist/node-esm/internal.js +3 -3
  96. package/dist/node-esm/src/api/account_management/mfa.d.ts +38 -4
  97. package/dist/node-esm/src/api/authentication/mfa.d.ts +11 -0
  98. package/dist/node-esm/src/core/errors.d.ts +1 -0
  99. package/dist/node-esm/src/core/index.d.ts +1 -0
  100. package/dist/node-esm/src/mfa/assertions/totp.d.ts +124 -0
  101. package/dist/node-esm/src/mfa/assertions/totp.test.d.ts +17 -0
  102. package/dist/node-esm/src/mfa/mfa_info.d.ts +5 -1
  103. package/dist/node-esm/src/model/enum_maps.d.ts +1 -0
  104. package/dist/node-esm/src/model/public_types.d.ts +18 -1
  105. package/dist/node-esm/test/helpers/integration/helpers.d.ts +3 -0
  106. package/dist/node-esm/test/integration/flows/totp.test.d.ts +17 -0
  107. package/dist/node-esm/{index-1f9492de.js → totp-a3bfc07a.js} +213 -7
  108. package/dist/node-esm/totp-a3bfc07a.js.map +1 -0
  109. package/dist/rn/index.d.ts +2 -1
  110. package/dist/rn/index.js +1 -1
  111. package/dist/rn/internal.js +176 -1
  112. package/dist/rn/internal.js.map +1 -1
  113. package/dist/rn/{phone-e7bf48a1.js → phone-588b1f48.js} +37 -5
  114. package/dist/rn/phone-588b1f48.js.map +1 -0
  115. package/dist/rn/src/api/account_management/mfa.d.ts +38 -4
  116. package/dist/rn/src/api/authentication/mfa.d.ts +11 -0
  117. package/dist/rn/src/core/errors.d.ts +1 -0
  118. package/dist/rn/src/core/index.d.ts +1 -0
  119. package/dist/rn/src/mfa/assertions/totp.d.ts +124 -0
  120. package/dist/rn/src/mfa/assertions/totp.test.d.ts +17 -0
  121. package/dist/rn/src/mfa/mfa_info.d.ts +5 -1
  122. package/dist/rn/src/model/enum_maps.d.ts +1 -0
  123. package/dist/rn/src/model/public_types.d.ts +18 -1
  124. package/dist/rn/test/helpers/integration/helpers.d.ts +3 -0
  125. package/dist/rn/test/integration/flows/totp.test.d.ts +17 -0
  126. package/dist/src/api/account_management/mfa.d.ts +38 -4
  127. package/dist/src/api/authentication/mfa.d.ts +11 -0
  128. package/dist/src/core/errors.d.ts +1 -0
  129. package/dist/src/core/index.d.ts +1 -0
  130. package/dist/src/mfa/assertions/totp.d.ts +124 -0
  131. package/dist/src/mfa/assertions/totp.test.d.ts +17 -0
  132. package/dist/src/mfa/mfa_info.d.ts +5 -1
  133. package/dist/src/model/enum_maps.d.ts +1 -0
  134. package/dist/src/model/public_types.d.ts +18 -1
  135. package/dist/test/helpers/integration/helpers.d.ts +3 -0
  136. package/dist/test/integration/flows/totp.test.d.ts +17 -0
  137. package/package.json +10 -8
  138. package/dist/browser-cjs/index-ff477525.js.map +0 -1
  139. package/dist/cordova/popup_redirect-a4d3c436.js.map +0 -1
  140. package/dist/esm2017/index-3363a72a.js.map +0 -1
  141. package/dist/esm5/index-3f05dc7b.js.map +0 -1
  142. package/dist/node/index-45468d80.js.map +0 -1
  143. package/dist/node-esm/index-1f9492de.js.map +0 -1
  144. package/dist/rn/phone-e7bf48a1.js.map +0 -1
@@ -18,7 +18,7 @@ import { SignInWithPhoneNumberRequest } from '../authentication/sms';
18
18
  import { FinalizeMfaResponse } from '../authentication/mfa';
19
19
  import { AuthInternal } from '../../model/auth';
20
20
  /**
21
- * MFA Info as returned by the API
21
+ * MFA Info as returned by the API.
22
22
  */
23
23
  interface BaseMfaEnrollment {
24
24
  mfaEnrollmentId: string;
@@ -26,15 +26,20 @@ interface BaseMfaEnrollment {
26
26
  displayName?: string;
27
27
  }
28
28
  /**
29
- * An MFA provided by SMS verification
29
+ * An MFA provided by SMS verification.
30
30
  */
31
31
  export interface PhoneMfaEnrollment extends BaseMfaEnrollment {
32
32
  phoneInfo: string;
33
33
  }
34
34
  /**
35
- * MfaEnrollment can be any subtype of BaseMfaEnrollment, currently only PhoneMfaEnrollment is supported
35
+ * An MFA provided by TOTP (Time-based One Time Password).
36
36
  */
37
- export declare type MfaEnrollment = PhoneMfaEnrollment;
37
+ export interface TotpMfaEnrollment extends BaseMfaEnrollment {
38
+ }
39
+ /**
40
+ * MfaEnrollment can be any subtype of BaseMfaEnrollment, currently only PhoneMfaEnrollment and TotpMfaEnrollment are supported.
41
+ */
42
+ export declare type MfaEnrollment = PhoneMfaEnrollment | TotpMfaEnrollment;
38
43
  export interface StartPhoneMfaEnrollmentRequest {
39
44
  idToken: string;
40
45
  phoneEnrollmentInfo: {
@@ -58,6 +63,35 @@ export interface FinalizePhoneMfaEnrollmentRequest {
58
63
  export interface FinalizePhoneMfaEnrollmentResponse extends FinalizeMfaResponse {
59
64
  }
60
65
  export declare function finalizeEnrollPhoneMfa(auth: AuthInternal, request: FinalizePhoneMfaEnrollmentRequest): Promise<FinalizePhoneMfaEnrollmentResponse>;
66
+ export interface StartTotpMfaEnrollmentRequest {
67
+ idToken: string;
68
+ totpEnrollmentInfo: {};
69
+ tenantId?: string;
70
+ }
71
+ export interface StartTotpMfaEnrollmentResponse {
72
+ totpSessionInfo: {
73
+ sharedSecretKey: string;
74
+ verificationCodeLength: number;
75
+ hashingAlgorithm: string;
76
+ periodSec: number;
77
+ sessionInfo: string;
78
+ finalizeEnrollmentTime: number;
79
+ };
80
+ }
81
+ export declare function startEnrollTotpMfa(auth: AuthInternal, request: StartTotpMfaEnrollmentRequest): Promise<StartTotpMfaEnrollmentResponse>;
82
+ export interface TotpVerificationInfo {
83
+ sessionInfo: string;
84
+ verificationCode: string;
85
+ }
86
+ export interface FinalizeTotpMfaEnrollmentRequest {
87
+ idToken: string;
88
+ totpVerificationInfo: TotpVerificationInfo;
89
+ displayName?: string | null;
90
+ tenantId?: string;
91
+ }
92
+ export interface FinalizeTotpMfaEnrollmentResponse extends FinalizeMfaResponse {
93
+ }
94
+ export declare function finalizeEnrollTotpMfa(auth: AuthInternal, request: FinalizeTotpMfaEnrollmentRequest): Promise<FinalizeTotpMfaEnrollmentResponse>;
61
95
  export interface WithdrawMfaRequest {
62
96
  idToken: string;
63
97
  mfaEnrollmentId: string;
@@ -49,9 +49,20 @@ export interface FinalizePhoneMfaSignInRequest {
49
49
  phoneVerificationInfo: SignInWithPhoneNumberRequest;
50
50
  tenantId?: string;
51
51
  }
52
+ export interface FinalizeTotpMfaSignInRequest {
53
+ mfaPendingCredential: string;
54
+ totpVerificationInfo: {
55
+ verificationCode: string;
56
+ };
57
+ tenantId?: string;
58
+ mfaEnrollmentId: string;
59
+ }
52
60
  export interface FinalizePhoneMfaSignInResponse extends FinalizeMfaResponse {
53
61
  }
62
+ export interface FinalizeTotpMfaSignInResponse extends FinalizeMfaResponse {
63
+ }
54
64
  export declare function finalizeSignInPhoneMfa(auth: Auth, request: FinalizePhoneMfaSignInRequest): Promise<FinalizePhoneMfaSignInResponse>;
65
+ export declare function finalizeSignInTotpMfa(auth: Auth, request: FinalizeTotpMfaSignInRequest): Promise<FinalizeTotpMfaSignInResponse>;
55
66
  /**
56
67
  * @internal
57
68
  */
@@ -86,6 +86,7 @@ export declare const enum AuthErrorCode {
86
86
  MISSING_MFA_INFO = "missing-multi-factor-info",
87
87
  MISSING_MFA_SESSION = "missing-multi-factor-session",
88
88
  MISSING_PHONE_NUMBER = "missing-phone-number",
89
+ MISSING_PASSWORD = "missing-password",
89
90
  MISSING_SESSION_INFO = "missing-verification-id",
90
91
  MODULE_DESTROYED = "app-deleted",
91
92
  NEED_CONFIRMATION = "account-exists-with-different-credential",
@@ -43,6 +43,7 @@ export declare function setPersistence(auth: Auth, persistence: Persistence): Pr
43
43
  *
44
44
  * @remarks
45
45
  * This includes sign-in, sign-out, and token refresh events.
46
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
46
47
  *
47
48
  * @param auth - The {@link Auth} instance.
48
49
  * @param nextOrObserver - callback triggered on change.
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { TotpMultiFactorAssertion, MultiFactorSession } from '../../model/public_types';
18
+ import { AuthInternal } from '../../model/auth';
19
+ import { StartTotpMfaEnrollmentResponse, TotpVerificationInfo } from '../../api/account_management/mfa';
20
+ import { FinalizeMfaResponse } from '../../api/authentication/mfa';
21
+ import { MultiFactorAssertionImpl } from '../../mfa/mfa_assertion';
22
+ /**
23
+ * Provider for generating a {@link TotpMultiFactorAssertion}.
24
+ *
25
+ * @public
26
+ */
27
+ export declare class TotpMultiFactorGenerator {
28
+ /**
29
+ * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of
30
+ * the TOTP (time-based one-time password) second factor.
31
+ * This assertion is used to complete enrollment in TOTP second factor.
32
+ *
33
+ * @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.
34
+ * @param oneTimePassword One-time password from TOTP App.
35
+ * @returns A {@link TotpMultiFactorAssertion} which can be used with
36
+ * {@link MultiFactorUser.enroll}.
37
+ */
38
+ static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion;
39
+ /**
40
+ * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.
41
+ * This assertion is used to complete signIn with TOTP as the second factor.
42
+ *
43
+ * @param enrollmentId identifies the enrolled TOTP second factor.
44
+ * @param oneTimePassword One-time password from TOTP App.
45
+ * @returns A {@link TotpMultiFactorAssertion} which can be used with
46
+ * {@link MultiFactorResolver.resolveSignIn}.
47
+ */
48
+ static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion;
49
+ /**
50
+ * Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.
51
+ * Creates a TOTP secret as part of enrolling a TOTP second factor.
52
+ * Used for generating a QR code URL or inputting into a TOTP app.
53
+ * This method uses the auth instance corresponding to the user in the multiFactorSession.
54
+ *
55
+ * @param session The {@link MultiFactorSession} that the user is part of.
56
+ * @returns A promise to {@link TotpSecret}.
57
+ */
58
+ static generateSecret(session: MultiFactorSession): Promise<TotpSecret>;
59
+ /**
60
+ * The identifier of the TOTP second factor: `totp`.
61
+ */
62
+ static FACTOR_ID: 'totp';
63
+ }
64
+ export declare class TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl implements TotpMultiFactorAssertion {
65
+ readonly otp: string;
66
+ readonly enrollmentId?: string | undefined;
67
+ readonly secret?: TotpSecret | undefined;
68
+ constructor(otp: string, enrollmentId?: string | undefined, secret?: TotpSecret | undefined);
69
+ /** @internal */
70
+ static _fromSecret(secret: TotpSecret, otp: string): TotpMultiFactorAssertionImpl;
71
+ /** @internal */
72
+ static _fromEnrollmentId(enrollmentId: string, otp: string): TotpMultiFactorAssertionImpl;
73
+ /** @internal */
74
+ _finalizeEnroll(auth: AuthInternal, idToken: string, displayName?: string | null): Promise<FinalizeMfaResponse>;
75
+ /** @internal */
76
+ _finalizeSignIn(auth: AuthInternal, mfaPendingCredential: string): Promise<FinalizeMfaResponse>;
77
+ }
78
+ /**
79
+ * Provider for generating a {@link TotpMultiFactorAssertion}.
80
+ *
81
+ * Stores the shared secret key and other parameters to generate time-based OTPs.
82
+ * Implements methods to retrieve the shared secret key and generate a QR code URL.
83
+ * @public
84
+ */
85
+ export declare class TotpSecret {
86
+ private readonly sessionInfo;
87
+ private readonly auth;
88
+ /**
89
+ * Shared secret key/seed used for enrolling in TOTP MFA and generating OTPs.
90
+ */
91
+ readonly secretKey: string;
92
+ /**
93
+ * Hashing algorithm used.
94
+ */
95
+ readonly hashingAlgorithm: string;
96
+ /**
97
+ * Length of the one-time passwords to be generated.
98
+ */
99
+ readonly codeLength: number;
100
+ /**
101
+ * The interval (in seconds) when the OTP codes should change.
102
+ */
103
+ readonly codeIntervalSeconds: number;
104
+ /**
105
+ * The timestamp (UTC string) by which TOTP enrollment should be completed.
106
+ */
107
+ readonly enrollmentCompletionDeadline: string;
108
+ private constructor();
109
+ /** @internal */
110
+ static _fromStartTotpMfaEnrollmentResponse(response: StartTotpMfaEnrollmentResponse, auth: AuthInternal): TotpSecret;
111
+ /** @internal */
112
+ _makeTotpVerificationInfo(otp: string): TotpVerificationInfo;
113
+ /**
114
+ * Returns a QR code URL as described in
115
+ * https://github.com/google/google-authenticator/wiki/Key-Uri-Format
116
+ * This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.
117
+ * If the optional parameters are unspecified, an accountName of <userEmail> and issuer of <firebaseAppName> are used.
118
+ *
119
+ * @param accountName the name of the account/app along with a user identifier.
120
+ * @param issuer issuer of the TOTP (likely the app name).
121
+ * @returns A QR code URL string.
122
+ */
123
+ generateQrCodeUrl(accountName?: string, issuer?: string): string;
124
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export {};
@@ -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 { FactorId, MultiFactorInfo, PhoneMultiFactorInfo } from '../model/public_types';
17
+ import { FactorId, MultiFactorInfo, PhoneMultiFactorInfo, TotpMultiFactorInfo } from '../model/public_types';
18
18
  import { MfaEnrollment } from '../api/account_management/mfa';
19
19
  import { AuthInternal } from '../model/auth';
20
20
  export declare abstract class MultiFactorInfoImpl implements MultiFactorInfo {
@@ -30,3 +30,7 @@ export declare class PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl implem
30
30
  private constructor();
31
31
  static _fromServerResponse(_auth: AuthInternal, enrollment: MfaEnrollment): PhoneMultiFactorInfoImpl;
32
32
  }
33
+ export declare class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl implements TotpMultiFactorInfo {
34
+ private constructor();
35
+ static _fromServerResponse(_auth: AuthInternal, enrollment: MfaEnrollment): TotpMultiFactorInfoImpl;
36
+ }
@@ -22,6 +22,7 @@
22
22
  export declare const FactorId: {
23
23
  /** Phone as second factor */
24
24
  readonly PHONE: "phone";
25
+ readonly TOTP: "totp";
25
26
  };
26
27
  /**
27
28
  * Enumeration of supported providers.
@@ -502,7 +502,8 @@ export interface AuthProvider {
502
502
  */
503
503
  export declare const enum FactorId {
504
504
  /** Phone as second factor */
505
- PHONE = "phone"
505
+ PHONE = "phone",
506
+ TOTP = "totp"
506
507
  }
507
508
  /**
508
509
  * A result from a phone number sign-in, link, or reauthenticate call.
@@ -609,6 +610,13 @@ export interface PhoneMultiFactorInfo extends MultiFactorInfo {
609
610
  /** The phone number associated with the current second factor. */
610
611
  readonly phoneNumber: string;
611
612
  }
613
+ /**
614
+ * The subclass of the {@link MultiFactorInfo} interface for TOTP
615
+ * second factors. The `factorId` of this second factor is {@link FactorId}.TOTP.
616
+ * @public
617
+ */
618
+ export interface TotpMultiFactorInfo extends MultiFactorInfo {
619
+ }
612
620
  /**
613
621
  * The class used to facilitate recovery from {@link MultiFactorError} when a user needs to
614
622
  * provide a second factor to sign in.
@@ -1160,3 +1168,12 @@ export interface Dependencies {
1160
1168
  */
1161
1169
  errorMap?: AuthErrorMap;
1162
1170
  }
1171
+ /**
1172
+ * The class for asserting ownership of a TOTP second factor. Provided by
1173
+ * {@link TotpMultiFactorGenerator.assertionForEnrollment} and
1174
+ * {@link TotpMultiFactorGenerator.assertionForSignIn}.
1175
+ *
1176
+ * @public
1177
+ */
1178
+ export interface TotpMultiFactorAssertion extends MultiFactorAssertion {
1179
+ }
@@ -18,3 +18,6 @@ import { Auth } from '../../../src/model/public_types';
18
18
  export declare function randomEmail(): string;
19
19
  export declare function getTestInstance(requireEmulator?: boolean): Auth;
20
20
  export declare function cleanUpTestInstance(auth: Auth): Promise<void>;
21
+ export declare function getTotpCode(sharedSecretKey: string, periodSec: number, verificationCodeLength: number, timestamp: Date): string;
22
+ export declare const email = "totpuser-donotdelete@test.com";
23
+ export declare const incorrectTotpCode = "1000000";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export {};
@@ -27,7 +27,8 @@ import { Component } from '@firebase/component';
27
27
  */
28
28
  const FactorId = {
29
29
  /** Phone as second factor */
30
- PHONE: 'phone'
30
+ PHONE: 'phone',
31
+ TOTP: 'totp'
31
32
  };
32
33
  /**
33
34
  * Enumeration of supported providers.
@@ -211,6 +212,7 @@ function _debugErrorMap() {
211
212
  ["missing-or-invalid-nonce" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' +
212
213
  'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' +
213
214
  'in the ID token payload.',
215
+ ["missing-password" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',
214
216
  ["missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',
215
217
  ["missing-multi-factor-session" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',
216
218
  ["missing-phone-number" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',
@@ -837,7 +839,7 @@ const SERVER_ERROR_MAP = {
837
839
  // Sign in with email and password errors (some apply to sign up too).
838
840
  ["INVALID_PASSWORD" /* ServerError.INVALID_PASSWORD */]: "wrong-password" /* AuthErrorCode.INVALID_PASSWORD */,
839
841
  // This can only happen if the SDK sends a bad request.
840
- ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "internal-error" /* AuthErrorCode.INTERNAL_ERROR */,
842
+ ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "missing-password" /* AuthErrorCode.MISSING_PASSWORD */,
841
843
  // Sign up with email and password errors.
842
844
  ["EMAIL_EXISTS" /* ServerError.EMAIL_EXISTS */]: "email-already-in-use" /* AuthErrorCode.EMAIL_EXISTS */,
843
845
  ["PASSWORD_LOGIN_DISABLED" /* ServerError.PASSWORD_LOGIN_DISABLED */]: "operation-not-allowed" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,
@@ -981,7 +983,10 @@ async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
981
983
  if (e instanceof FirebaseError) {
982
984
  throw e;
983
985
  }
984
- _fail(auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { 'message': String(e) });
986
+ // Changing this to a different error code will log user out when there is a network error
987
+ // because we treat any error other than NETWORK_REQUEST_FAILED as token is invalid.
988
+ // https://github.com/firebase/firebase-js-sdk/blob/4fbc73610d70be4e0852e7de63a39cb7897e8546/packages/auth/src/core/auth/auth_impl.ts#L309-L316
989
+ _fail(auth, "network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */, { 'message': String(e) });
985
990
  }
986
991
  }
987
992
  async function _performSignInRequest(auth, method, path, request, customErrorMap = {}) {
@@ -4859,6 +4864,9 @@ class MultiFactorInfoImpl {
4859
4864
  if ('phoneInfo' in enrollment) {
4860
4865
  return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);
4861
4866
  }
4867
+ else if ('totpInfo' in enrollment) {
4868
+ return TotpMultiFactorInfoImpl._fromServerResponse(auth, enrollment);
4869
+ }
4862
4870
  return _fail(auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
4863
4871
  }
4864
4872
  }
@@ -4870,6 +4878,14 @@ class PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {
4870
4878
  static _fromServerResponse(_auth, enrollment) {
4871
4879
  return new PhoneMultiFactorInfoImpl(enrollment);
4872
4880
  }
4881
+ }
4882
+ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
4883
+ constructor(response) {
4884
+ super("totp" /* FactorId.TOTP */, response);
4885
+ }
4886
+ static _fromServerResponse(_auth, enrollment) {
4887
+ return new TotpMultiFactorInfoImpl(enrollment);
4888
+ }
4873
4889
  }
4874
4890
 
4875
4891
  /**
@@ -5673,6 +5689,7 @@ function setPersistence(auth, persistence) {
5673
5689
  *
5674
5690
  * @remarks
5675
5691
  * This includes sign-in, sign-out, and token refresh events.
5692
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
5676
5693
  *
5677
5694
  * @param auth - The {@link Auth} instance.
5678
5695
  * @param nextOrObserver - callback triggered on change.
@@ -5906,6 +5923,12 @@ function startEnrollPhoneMfa(auth, request) {
5906
5923
  function finalizeEnrollPhoneMfa(auth, request) {
5907
5924
  return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaEnrollment:finalize" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));
5908
5925
  }
5926
+ function startEnrollTotpMfa(auth, request) {
5927
+ return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaEnrollment:start" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));
5928
+ }
5929
+ function finalizeEnrollTotpMfa(auth, request) {
5930
+ return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaEnrollment:finalize" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));
5931
+ }
5909
5932
  function withdrawMfa(auth, request) {
5910
5933
  return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaEnrollment:withdraw" /* Endpoint.WITHDRAW_MFA */, _addTidIfNecessary(auth, request));
5911
5934
  }
@@ -7001,6 +7024,9 @@ function startSignInPhoneMfa(auth, request) {
7001
7024
  }
7002
7025
  function finalizeSignInPhoneMfa(auth, request) {
7003
7026
  return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaSignIn:finalize" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));
7027
+ }
7028
+ function finalizeSignInTotpMfa(auth, request) {
7029
+ return _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/mfaSignIn:finalize" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));
7004
7030
  }
7005
7031
 
7006
7032
  /**
@@ -9311,8 +9337,155 @@ class PhoneMultiFactorGenerator {
9311
9337
  */
9312
9338
  PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
9313
9339
 
9340
+ /**
9341
+ * Provider for generating a {@link TotpMultiFactorAssertion}.
9342
+ *
9343
+ * @public
9344
+ */
9345
+ class TotpMultiFactorGenerator {
9346
+ /**
9347
+ * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of
9348
+ * the TOTP (time-based one-time password) second factor.
9349
+ * This assertion is used to complete enrollment in TOTP second factor.
9350
+ *
9351
+ * @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.
9352
+ * @param oneTimePassword One-time password from TOTP App.
9353
+ * @returns A {@link TotpMultiFactorAssertion} which can be used with
9354
+ * {@link MultiFactorUser.enroll}.
9355
+ */
9356
+ static assertionForEnrollment(secret, oneTimePassword) {
9357
+ return TotpMultiFactorAssertionImpl._fromSecret(secret, oneTimePassword);
9358
+ }
9359
+ /**
9360
+ * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.
9361
+ * This assertion is used to complete signIn with TOTP as the second factor.
9362
+ *
9363
+ * @param enrollmentId identifies the enrolled TOTP second factor.
9364
+ * @param oneTimePassword One-time password from TOTP App.
9365
+ * @returns A {@link TotpMultiFactorAssertion} which can be used with
9366
+ * {@link MultiFactorResolver.resolveSignIn}.
9367
+ */
9368
+ static assertionForSignIn(enrollmentId, oneTimePassword) {
9369
+ return TotpMultiFactorAssertionImpl._fromEnrollmentId(enrollmentId, oneTimePassword);
9370
+ }
9371
+ /**
9372
+ * Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.
9373
+ * Creates a TOTP secret as part of enrolling a TOTP second factor.
9374
+ * Used for generating a QR code URL or inputting into a TOTP app.
9375
+ * This method uses the auth instance corresponding to the user in the multiFactorSession.
9376
+ *
9377
+ * @param session The {@link MultiFactorSession} that the user is part of.
9378
+ * @returns A promise to {@link TotpSecret}.
9379
+ */
9380
+ static async generateSecret(session) {
9381
+ const mfaSession = session;
9382
+ _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9383
+ const response = await startEnrollTotpMfa(mfaSession.auth, {
9384
+ idToken: mfaSession.credential,
9385
+ totpEnrollmentInfo: {}
9386
+ });
9387
+ return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
9388
+ }
9389
+ }
9390
+ /**
9391
+ * The identifier of the TOTP second factor: `totp`.
9392
+ */
9393
+ TotpMultiFactorGenerator.FACTOR_ID = "totp" /* FactorId.TOTP */;
9394
+ class TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl {
9395
+ constructor(otp, enrollmentId, secret) {
9396
+ super("totp" /* FactorId.TOTP */);
9397
+ this.otp = otp;
9398
+ this.enrollmentId = enrollmentId;
9399
+ this.secret = secret;
9400
+ }
9401
+ /** @internal */
9402
+ static _fromSecret(secret, otp) {
9403
+ return new TotpMultiFactorAssertionImpl(otp, undefined, secret);
9404
+ }
9405
+ /** @internal */
9406
+ static _fromEnrollmentId(enrollmentId, otp) {
9407
+ return new TotpMultiFactorAssertionImpl(otp, enrollmentId);
9408
+ }
9409
+ /** @internal */
9410
+ async _finalizeEnroll(auth, idToken, displayName) {
9411
+ _assert(typeof this.secret !== 'undefined', auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9412
+ return finalizeEnrollTotpMfa(auth, {
9413
+ idToken,
9414
+ displayName,
9415
+ totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)
9416
+ });
9417
+ }
9418
+ /** @internal */
9419
+ async _finalizeSignIn(auth, mfaPendingCredential) {
9420
+ _assert(this.enrollmentId !== undefined && this.otp !== undefined, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9421
+ const totpVerificationInfo = { verificationCode: this.otp };
9422
+ return finalizeSignInTotpMfa(auth, {
9423
+ mfaPendingCredential,
9424
+ mfaEnrollmentId: this.enrollmentId,
9425
+ totpVerificationInfo
9426
+ });
9427
+ }
9428
+ }
9429
+ /**
9430
+ * Provider for generating a {@link TotpMultiFactorAssertion}.
9431
+ *
9432
+ * Stores the shared secret key and other parameters to generate time-based OTPs.
9433
+ * Implements methods to retrieve the shared secret key and generate a QR code URL.
9434
+ * @public
9435
+ */
9436
+ class TotpSecret {
9437
+ // The public members are declared outside the constructor so the docs can be generated.
9438
+ constructor(secretKey, hashingAlgorithm, codeLength, codeIntervalSeconds, enrollmentCompletionDeadline, sessionInfo, auth) {
9439
+ this.sessionInfo = sessionInfo;
9440
+ this.auth = auth;
9441
+ this.secretKey = secretKey;
9442
+ this.hashingAlgorithm = hashingAlgorithm;
9443
+ this.codeLength = codeLength;
9444
+ this.codeIntervalSeconds = codeIntervalSeconds;
9445
+ this.enrollmentCompletionDeadline = enrollmentCompletionDeadline;
9446
+ }
9447
+ /** @internal */
9448
+ static _fromStartTotpMfaEnrollmentResponse(response, auth) {
9449
+ return new TotpSecret(response.totpSessionInfo.sharedSecretKey, response.totpSessionInfo.hashingAlgorithm, response.totpSessionInfo.verificationCodeLength, response.totpSessionInfo.periodSec, new Date(response.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), response.totpSessionInfo.sessionInfo, auth);
9450
+ }
9451
+ /** @internal */
9452
+ _makeTotpVerificationInfo(otp) {
9453
+ return { sessionInfo: this.sessionInfo, verificationCode: otp };
9454
+ }
9455
+ /**
9456
+ * Returns a QR code URL as described in
9457
+ * https://github.com/google/google-authenticator/wiki/Key-Uri-Format
9458
+ * This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.
9459
+ * If the optional parameters are unspecified, an accountName of <userEmail> and issuer of <firebaseAppName> are used.
9460
+ *
9461
+ * @param accountName the name of the account/app along with a user identifier.
9462
+ * @param issuer issuer of the TOTP (likely the app name).
9463
+ * @returns A QR code URL string.
9464
+ */
9465
+ generateQrCodeUrl(accountName, issuer) {
9466
+ var _a;
9467
+ let useDefaults = false;
9468
+ if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
9469
+ useDefaults = true;
9470
+ }
9471
+ if (useDefaults) {
9472
+ if (_isEmptyString(accountName)) {
9473
+ accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';
9474
+ }
9475
+ if (_isEmptyString(issuer)) {
9476
+ issuer = this.auth.name;
9477
+ }
9478
+ }
9479
+ return `otpauth://totp/${issuer}:${accountName}?secret=${this.secretKey}&issuer=${issuer}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`;
9480
+ }
9481
+ }
9482
+ /** @internal */
9483
+ function _isEmptyString(input) {
9484
+ return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
9485
+ }
9486
+
9314
9487
  var name = "@firebase/auth";
9315
- var version = "0.21.5";
9488
+ var version = "0.21.6-canary.45a55330e";
9316
9489
 
9317
9490
  /**
9318
9491
  * @license
@@ -9537,5 +9710,5 @@ function getAuth(app = getApp()) {
9537
9710
  }
9538
9711
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
9539
9712
 
9540
- 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, _persistenceKeyName 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, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _isIOS7Or8 as av, _createError as aw, _assert as ax, AuthEventManager as ay, _getInstance 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 };
9541
- //# sourceMappingURL=index-3363a72a.js.map
9713
+ export { linkWithCredential as $, ActionCodeOperation as A, deleteUser as B, debugErrorMap as C, prodErrorMap as D, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as E, FactorId as F, initializeAuth as G, connectAuthEmulator as H, AuthCredential as I, EmailAuthCredential as J, OAuthCredential as K, PhoneAuthCredential as L, inMemoryPersistence as M, EmailAuthProvider as N, OperationType as O, PhoneAuthProvider as P, FacebookAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, GoogleAuthProvider as U, GithubAuthProvider as V, OAuthProvider as W, SAMLAuthProvider as X, TwitterAuthProvider as Y, signInAnonymously as Z, signInWithCredential as _, browserSessionPersistence as a, reauthenticateWithCredential as a0, signInWithCustomToken as a1, sendPasswordResetEmail as a2, confirmPasswordReset as a3, applyActionCode as a4, checkActionCode as a5, verifyPasswordResetCode as a6, createUserWithEmailAndPassword as a7, signInWithEmailAndPassword as a8, sendSignInLinkToEmail as a9, AuthEventManager as aA, _getInstance as aB, _persistenceKeyName as aC, _getRedirectResult as aD, _overrideRedirectResult as aE, _clearRedirectOutcomes as aF, _castAuth as aG, UserImpl as aH, AuthImpl as aI, _getClientVersion as aJ, _generateEventId as aK, AuthPopup as aL, FetchProvider as aM, SAMLAuthCredential as aN, isSignInWithEmailLink as aa, signInWithEmailLink as ab, fetchSignInMethodsForEmail as ac, sendEmailVerification as ad, verifyBeforeUpdateEmail as ae, ActionCodeURL as af, parseActionCodeURL as ag, updateProfile as ah, updateEmail as ai, updatePassword as aj, getIdToken as ak, getIdTokenResult as al, unlink as am, getAdditionalUserInfo as an, reload as ao, getMultiFactorResolver as ap, multiFactor as aq, debugAssert as ar, _isIOS as as, _isAndroid as at, _fail as au, _getRedirectUrl as av, _getProjectConfig as aw, _isIOS7Or8 as ax, _createError as ay, _assert 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, onIdTokenChanged as t, updatePhoneNumber as u, beforeAuthStateChanged as v, onAuthStateChanged as w, useDeviceLanguage as x, updateCurrentUser as y, signOut as z };
9714
+ //# sourceMappingURL=index-c8153924.js.map