@firebase/auth 1.7.1-canary.e1a7764cf → 1.7.1-passkey-preview.103ead202
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 +60 -15
- package/dist/auth.d.ts +64 -16
- package/dist/browser-cjs/{index-b554a82d.js → index-763ce1de.js} +261 -17
- package/dist/browser-cjs/index-763ce1de.js.map +1 -0
- package/dist/browser-cjs/index.js +4 -1
- package/dist/browser-cjs/index.js.map +1 -1
- package/dist/browser-cjs/internal.js +4 -1
- package/dist/browser-cjs/internal.js.map +1 -1
- package/dist/browser-cjs/src/api/account_management/account.d.ts +2 -0
- package/dist/browser-cjs/src/api/account_management/passkey.d.ts +83 -0
- package/dist/browser-cjs/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/index.d.ts +5 -1
- package/dist/browser-cjs/src/core/index.d.ts +1 -0
- package/dist/browser-cjs/src/core/strategies/email.d.ts +3 -5
- package/dist/browser-cjs/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/browser-cjs/src/core/strategies/passkey.d.ts +41 -0
- package/dist/browser-cjs/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/account_info.d.ts +1 -3
- package/dist/browser-cjs/src/core/user/user_impl.d.ts +2 -1
- package/dist/browser-cjs/src/model/enums.d.ts +6 -2
- package/dist/browser-cjs/src/model/public_types.d.ts +18 -1
- package/dist/browser-cjs/src/model/user.d.ts +3 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-89a4178c.js → popup_redirect-619ee864.js} +331 -18
- package/dist/cordova/popup_redirect-619ee864.js.map +1 -0
- package/dist/cordova/src/api/account_management/account.d.ts +2 -0
- package/dist/cordova/src/api/account_management/passkey.d.ts +83 -0
- package/dist/cordova/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/cordova/src/api/index.d.ts +5 -1
- package/dist/cordova/src/core/index.d.ts +1 -0
- package/dist/cordova/src/core/strategies/email.d.ts +3 -5
- package/dist/cordova/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/cordova/src/core/strategies/passkey.d.ts +41 -0
- package/dist/cordova/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/cordova/src/core/user/account_info.d.ts +1 -3
- package/dist/cordova/src/core/user/user_impl.d.ts +2 -1
- package/dist/cordova/src/model/enums.d.ts +6 -2
- package/dist/cordova/src/model/public_types.d.ts +18 -1
- package/dist/cordova/src/model/user.d.ts +3 -0
- package/dist/esm2017/{index-456eaf5d.js → index-e517538d.js} +259 -18
- package/dist/esm2017/index-e517538d.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/account_management/account.d.ts +2 -0
- package/dist/esm2017/src/api/account_management/passkey.d.ts +83 -0
- package/dist/esm2017/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/esm2017/src/api/index.d.ts +5 -1
- package/dist/esm2017/src/core/index.d.ts +1 -0
- package/dist/esm2017/src/core/strategies/email.d.ts +3 -5
- package/dist/esm2017/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/esm2017/src/core/strategies/passkey.d.ts +41 -0
- package/dist/esm2017/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/esm2017/src/core/user/account_info.d.ts +1 -3
- package/dist/esm2017/src/core/user/user_impl.d.ts +2 -1
- package/dist/esm2017/src/model/enums.d.ts +6 -2
- package/dist/esm2017/src/model/public_types.d.ts +18 -1
- package/dist/esm2017/src/model/user.d.ts +3 -0
- package/dist/esm5/{index-7c43a070.js → index-5377e4d7.js} +331 -18
- package/dist/esm5/index-5377e4d7.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/account_management/account.d.ts +2 -0
- package/dist/esm5/src/api/account_management/passkey.d.ts +83 -0
- package/dist/esm5/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/esm5/src/api/index.d.ts +5 -1
- package/dist/esm5/src/core/index.d.ts +1 -0
- package/dist/esm5/src/core/strategies/email.d.ts +3 -5
- package/dist/esm5/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/esm5/src/core/strategies/passkey.d.ts +41 -0
- package/dist/esm5/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/esm5/src/core/user/account_info.d.ts +1 -3
- package/dist/esm5/src/core/user/user_impl.d.ts +2 -1
- package/dist/esm5/src/model/enums.d.ts +6 -2
- package/dist/esm5/src/model/public_types.d.ts +18 -1
- package/dist/esm5/src/model/user.d.ts +3 -0
- package/dist/index.webworker.esm5.js +330 -17
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.js +4 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/internal.js +4 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/api/account_management/account.d.ts +2 -0
- package/dist/node/src/api/account_management/passkey.d.ts +83 -0
- package/dist/node/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/node/src/api/index.d.ts +5 -1
- package/dist/node/src/core/index.d.ts +1 -0
- package/dist/node/src/core/strategies/email.d.ts +3 -5
- package/dist/node/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/node/src/core/strategies/passkey.d.ts +41 -0
- package/dist/node/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/node/src/core/user/account_info.d.ts +1 -3
- package/dist/node/src/core/user/user_impl.d.ts +2 -1
- package/dist/node/src/model/enums.d.ts +6 -2
- package/dist/node/src/model/public_types.d.ts +18 -1
- package/dist/node/src/model/user.d.ts +3 -0
- package/dist/node/{totp-38aba8fd.js → totp-e59979fc.js} +333 -17
- package/dist/node/totp-e59979fc.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/account_management/account.d.ts +2 -0
- package/dist/node-esm/src/api/account_management/passkey.d.ts +83 -0
- package/dist/node-esm/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/node-esm/src/api/index.d.ts +5 -1
- package/dist/node-esm/src/core/index.d.ts +1 -0
- package/dist/node-esm/src/core/strategies/email.d.ts +3 -5
- package/dist/node-esm/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/node-esm/src/core/strategies/passkey.d.ts +41 -0
- package/dist/node-esm/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/node-esm/src/core/user/account_info.d.ts +1 -3
- package/dist/node-esm/src/core/user/user_impl.d.ts +2 -1
- package/dist/node-esm/src/model/enums.d.ts +6 -2
- package/dist/node-esm/src/model/public_types.d.ts +18 -1
- package/dist/node-esm/src/model/user.d.ts +3 -0
- package/dist/node-esm/{totp-e448e7fe.js → totp-86acc588.js} +259 -18
- package/dist/node-esm/totp-86acc588.js.map +1 -0
- package/dist/rn/{index-985afdb4.js → index-551e6aca.js} +333 -17
- package/dist/rn/index-551e6aca.js.map +1 -0
- package/dist/rn/index.js +4 -1
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +4 -1
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/src/api/account_management/account.d.ts +2 -0
- package/dist/rn/src/api/account_management/passkey.d.ts +83 -0
- package/dist/rn/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/rn/src/api/index.d.ts +5 -1
- package/dist/rn/src/core/index.d.ts +1 -0
- package/dist/rn/src/core/strategies/email.d.ts +3 -5
- package/dist/rn/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/rn/src/core/strategies/passkey.d.ts +41 -0
- package/dist/rn/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/rn/src/core/user/account_info.d.ts +1 -3
- package/dist/rn/src/core/user/user_impl.d.ts +2 -1
- package/dist/rn/src/model/enums.d.ts +6 -2
- package/dist/rn/src/model/public_types.d.ts +18 -1
- package/dist/rn/src/model/user.d.ts +3 -0
- package/dist/src/api/account_management/account.d.ts +2 -0
- package/dist/src/api/account_management/passkey.d.ts +83 -0
- package/dist/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/src/api/index.d.ts +5 -1
- package/dist/src/core/index.d.ts +1 -0
- package/dist/src/core/strategies/email.d.ts +3 -5
- package/dist/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/src/core/strategies/passkey.d.ts +41 -0
- package/dist/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/src/core/user/account_info.d.ts +1 -3
- package/dist/src/core/user/user_impl.d.ts +2 -1
- package/dist/src/model/enums.d.ts +6 -2
- package/dist/src/model/public_types.d.ts +18 -1
- package/dist/src/model/user.d.ts +3 -0
- package/dist/web-extension-cjs/index.js +4 -1
- package/dist/web-extension-cjs/index.js.map +1 -1
- package/dist/web-extension-cjs/internal.js +4 -1
- package/dist/web-extension-cjs/internal.js.map +1 -1
- package/dist/web-extension-cjs/{register-e3ac7adf.js → register-84d046a5.js} +261 -17
- package/dist/web-extension-cjs/register-84d046a5.js.map +1 -0
- package/dist/web-extension-cjs/src/api/account_management/account.d.ts +2 -0
- package/dist/web-extension-cjs/src/api/account_management/passkey.d.ts +83 -0
- package/dist/web-extension-cjs/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/web-extension-cjs/src/api/index.d.ts +5 -1
- package/dist/web-extension-cjs/src/core/index.d.ts +1 -0
- package/dist/web-extension-cjs/src/core/strategies/email.d.ts +3 -5
- package/dist/web-extension-cjs/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/web-extension-cjs/src/core/strategies/passkey.d.ts +41 -0
- package/dist/web-extension-cjs/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/web-extension-cjs/src/core/user/account_info.d.ts +1 -3
- package/dist/web-extension-cjs/src/core/user/user_impl.d.ts +2 -1
- package/dist/web-extension-cjs/src/model/enums.d.ts +6 -2
- package/dist/web-extension-cjs/src/model/public_types.d.ts +18 -1
- package/dist/web-extension-cjs/src/model/user.d.ts +3 -0
- package/dist/web-extension-esm2017/index.js +2 -2
- package/dist/web-extension-esm2017/internal.js +2 -2
- package/dist/web-extension-esm2017/{register-ffa8f4d2.js → register-49f5fb7d.js} +259 -18
- package/dist/web-extension-esm2017/register-49f5fb7d.js.map +1 -0
- package/dist/web-extension-esm2017/src/api/account_management/account.d.ts +2 -0
- package/dist/web-extension-esm2017/src/api/account_management/passkey.d.ts +83 -0
- package/dist/web-extension-esm2017/src/api/account_management/passkey.test.d.ts +17 -0
- package/dist/web-extension-esm2017/src/api/index.d.ts +5 -1
- package/dist/web-extension-esm2017/src/core/index.d.ts +1 -0
- package/dist/web-extension-esm2017/src/core/strategies/email.d.ts +3 -5
- package/dist/web-extension-esm2017/src/core/strategies/email_and_password.d.ts +4 -6
- package/dist/web-extension-esm2017/src/core/strategies/passkey.d.ts +41 -0
- package/dist/web-extension-esm2017/src/core/strategies/passkey.test.d.ts +17 -0
- package/dist/web-extension-esm2017/src/core/user/account_info.d.ts +1 -3
- package/dist/web-extension-esm2017/src/core/user/user_impl.d.ts +2 -1
- package/dist/web-extension-esm2017/src/model/enums.d.ts +6 -2
- package/dist/web-extension-esm2017/src/model/public_types.d.ts +18 -1
- package/dist/web-extension-esm2017/src/model/user.d.ts +3 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-b554a82d.js.map +0 -1
- package/dist/cordova/popup_redirect-89a4178c.js.map +0 -1
- package/dist/esm2017/index-456eaf5d.js.map +0 -1
- package/dist/esm5/index-7c43a070.js.map +0 -1
- package/dist/node/totp-38aba8fd.js.map +0 -1
- package/dist/node-esm/totp-e448e7fe.js.map +0 -1
- package/dist/rn/index-985afdb4.js.map +0 -1
- package/dist/web-extension-cjs/register-e3ac7adf.js.map +0 -1
- package/dist/web-extension-esm2017/package.json +0 -1
- package/dist/web-extension-esm2017/register-ffa8f4d2.js.map +0 -1
|
@@ -24,6 +24,7 @@ import { UserMetadata } from '../core/user/user_metadata';
|
|
|
24
24
|
import { AuthInternal } from './auth';
|
|
25
25
|
import { IdTokenResponse, TaggedWithTokenResponse } from './id_token';
|
|
26
26
|
import { ProviderId } from './enums';
|
|
27
|
+
import { PasskeyInfo } from '../api/account_management/passkey';
|
|
27
28
|
export declare type MutableUserInfo = {
|
|
28
29
|
-readonly [K in keyof UserInfo]: UserInfo[K];
|
|
29
30
|
};
|
|
@@ -39,6 +40,7 @@ export interface UserParameters {
|
|
|
39
40
|
emailVerified?: boolean | null;
|
|
40
41
|
tenantId?: string | null;
|
|
41
42
|
providerData?: MutableUserInfo[] | null;
|
|
43
|
+
enrolledPasskeys?: PasskeyInfo[];
|
|
42
44
|
createdAt?: string | null;
|
|
43
45
|
lastLoginAt?: string | null;
|
|
44
46
|
}
|
|
@@ -60,6 +62,7 @@ export interface UserInternal extends User {
|
|
|
60
62
|
tenantId: string | null;
|
|
61
63
|
providerData: MutableUserInfo[];
|
|
62
64
|
metadata: UserMetadata;
|
|
65
|
+
enrolledPasskeys: PasskeyInfo[];
|
|
63
66
|
stsTokenManager: StsTokenManager;
|
|
64
67
|
_redirectEventId?: string;
|
|
65
68
|
_updateTokensIfNecessary(response: IdTokenResponse | FinalizeMfaResponse, reload?: boolean): Promise<void>;
|
package/dist/cordova/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getApp, _getProvider } from '@firebase/app';
|
|
2
|
-
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-
|
|
3
|
-
export { A as ActionCodeOperation,
|
|
2
|
+
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-619ee864.js';
|
|
3
|
+
export { A as ActionCodeOperation, a9 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a7 as enrollPasskey, a3 as fetchSignInMethodsForEmail, ah as getAdditionalUserInfo, ae as getIdToken, af as getIdTokenResult, aj as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, ak as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, aa as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, ai as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, a6 as signInWithPasskey, m as signOut, a8 as unenrollPasskey, ag as unlink, l as updateCurrentUser, ac as updateEmail, ad as updatePassword, ab as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-619ee864.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import '@firebase/util';
|
|
6
6
|
import '@firebase/component';
|
package/dist/cordova/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ActionCodeOperation,
|
|
1
|
+
import { al as _performApiRequest, am as _addTidIfNecessary, an as _assert, ao as Delay, ap as _window, aq as isV2, ar as _createError, as as _recaptchaV2ScriptUrl, at as _loadJS, au as _generateCallbackName, av as getRecaptchaParams, aw as _isHttpOrHttps, ax as _isWorker, ay as _castAuth, M as signInWithCredential, az as _serverAppCurrentUserOperationNotSupportedError, N as linkWithCredential, aA as _assertLinkedStatus, Q as reauthenticateWithCredential, aB as sendPhoneVerificationCode, aC as startEnrollPhoneMfa, aD as _link, B as PhoneAuthCredential, aE as debugAssert, aF as _generateEventId, aG as AbstractPopupRedirectOperation, aH as _assertInstanceOf, aI as _withDefaultResolver, aJ as FederatedAuthProvider, aK as _fail, aL as _getProjectConfig, aM as _getCurrentUrl, aN as _gapiScriptUrl, aO as _emulatorUrl, aP as _isChromeIOS, aQ as _isFirefox, aR as _isIOSStandalone, aS as _getRedirectUrl, aT as _setWindowLocation, aU as _isMobileBrowser, aV as _isSafari, aW as _isIOS, f as browserSessionPersistence, aX as _getRedirectResult, aY as _overrideRedirectResult, aZ as AuthEventManager, a_ as debugFail, a$ as finalizeEnrollPhoneMfa, b0 as finalizeEnrollTotpMfa, b1 as startEnrollTotpMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, j as beforeAuthStateChanged, o as onIdTokenChanged, x as connectAuthEmulator, b2 as _setExternalJSProvider } from './popup_redirect-619ee864.js';
|
|
2
|
+
export { A as ActionCodeOperation, a9 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, b6 as AuthImpl, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, b8 as FetchProvider, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, b9 as SAMLAuthCredential, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, b4 as UserImpl, an as _assert, ay as _castAuth, aK as _fail, aF as _generateEventId, b7 as _getClientVersion, b5 as _getInstance, aX as _getRedirectResult, aY as _overrideRedirectResult, b3 as _persistenceKeyName, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a7 as enrollPasskey, a3 as fetchSignInMethodsForEmail, ah as getAdditionalUserInfo, ae as getIdToken, af as getIdTokenResult, aj as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, bb as linkWithRedirect, ak as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, aa as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, bc as reauthenticateWithRedirect, ai as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, a6 as signInWithPasskey, ba as signInWithRedirect, m as signOut, a8 as unenrollPasskey, ag as unlink, l as updateCurrentUser, ac as updateEmail, ad as updatePassword, ab as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-619ee864.js';
|
|
3
3
|
import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
|
|
4
4
|
import { querystring, getModularInstance, getUA, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
5
5
|
import { _isFirebaseServerApp, SDK_VERSION, getApp, _getProvider } from '@firebase/app';
|
|
@@ -2438,7 +2438,8 @@ function _reloadWithoutSaving(user) {
|
|
|
2438
2438
|
tenantId: coreAccount.tenantId || null,
|
|
2439
2439
|
providerData: providerData,
|
|
2440
2440
|
metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
|
|
2441
|
-
isAnonymous: isAnonymous
|
|
2441
|
+
isAnonymous: isAnonymous,
|
|
2442
|
+
enrolledPasskeys: coreAccount.passkeyInfo || []
|
|
2442
2443
|
};
|
|
2443
2444
|
Object.assign(user, updates);
|
|
2444
2445
|
return [2 /*return*/];
|
|
@@ -2736,6 +2737,8 @@ var UserImpl = /** @class */ (function () {
|
|
|
2736
2737
|
this.isAnonymous = opt.isAnonymous || false;
|
|
2737
2738
|
this.tenantId = opt.tenantId || null;
|
|
2738
2739
|
this.providerData = opt.providerData ? __spreadArray([], opt.providerData, true) : [];
|
|
2740
|
+
this.enrolledPasskeys = opt.enrolledPasskeys
|
|
2741
|
+
? __spreadArray([], opt.enrolledPasskeys, true) : [];
|
|
2739
2742
|
this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);
|
|
2740
2743
|
}
|
|
2741
2744
|
UserImpl.prototype.getIdToken = function (forceRefresh) {
|
|
@@ -2778,6 +2781,7 @@ var UserImpl = /** @class */ (function () {
|
|
|
2778
2781
|
this.isAnonymous = user.isAnonymous;
|
|
2779
2782
|
this.tenantId = user.tenantId;
|
|
2780
2783
|
this.providerData = user.providerData.map(function (userInfo) { return (__assign({}, userInfo)); });
|
|
2784
|
+
this.enrolledPasskeys = user.enrolledPasskeys.map(function (passkeyInfo) { return (__assign({}, passkeyInfo)); });
|
|
2781
2785
|
this.metadata._copy(user.metadata);
|
|
2782
2786
|
this.stsTokenManager._assign(user.stsTokenManager);
|
|
2783
2787
|
};
|
|
@@ -7574,8 +7578,7 @@ function recachePasswordPolicy(auth) {
|
|
|
7574
7578
|
/**
|
|
7575
7579
|
* Sends a password reset email to the given email address. This method does not throw an error when
|
|
7576
7580
|
* there's no user account with the given email address and
|
|
7577
|
-
*
|
|
7578
|
-
* is enabled.
|
|
7581
|
+
* [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
7579
7582
|
*
|
|
7580
7583
|
* @remarks
|
|
7581
7584
|
* To complete the password reset, call {@link confirmPasswordReset} with the code supplied in
|
|
@@ -7821,10 +7824,9 @@ function createUserWithEmailAndPassword(auth, email, password) {
|
|
|
7821
7824
|
* Asynchronously signs in using an email and password.
|
|
7822
7825
|
*
|
|
7823
7826
|
* @remarks
|
|
7824
|
-
* Fails with an error if the email address and password do not match.
|
|
7825
|
-
*
|
|
7826
|
-
*
|
|
7827
|
-
* email/password.
|
|
7827
|
+
* Fails with an error if the email address and password do not match.
|
|
7828
|
+
* When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,
|
|
7829
|
+
* this method fails with "auth/invalid-credential" in case of an invalid email/password.
|
|
7828
7830
|
*
|
|
7829
7831
|
* This method is not supported on {@link Auth} instances created with a
|
|
7830
7832
|
* {@link @firebase/app#FirebaseServerApp}.
|
|
@@ -8048,9 +8050,8 @@ function createAuthUri(auth, request) {
|
|
|
8048
8050
|
*/
|
|
8049
8051
|
/**
|
|
8050
8052
|
* Gets the list of possible sign in methods for the given email address. This method returns an
|
|
8051
|
-
* empty list when
|
|
8052
|
-
*
|
|
8053
|
-
* is enabled, irrespective of the number of authentication methods available for the given email.
|
|
8053
|
+
* empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of
|
|
8054
|
+
* authentication methods available for the given email.
|
|
8054
8055
|
*
|
|
8055
8056
|
* @remarks
|
|
8056
8057
|
* This is useful to differentiate methods of sign-in for the same provider, eg.
|
|
@@ -8062,8 +8063,7 @@ function createAuthUri(auth, request) {
|
|
|
8062
8063
|
* @param email - The user's email address.
|
|
8063
8064
|
*
|
|
8064
8065
|
* Deprecated. Migrating off of this method is recommended as a security best-practice.
|
|
8065
|
-
* Learn more in the Identity Platform documentation for
|
|
8066
|
-
* {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}.
|
|
8066
|
+
* Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).
|
|
8067
8067
|
* @public
|
|
8068
8068
|
*/
|
|
8069
8069
|
function fetchSignInMethodsForEmail(auth, email) {
|
|
@@ -8215,6 +8215,321 @@ function verifyBeforeUpdateEmail(user, newEmail, actionCodeSettings) {
|
|
|
8215
8215
|
});
|
|
8216
8216
|
}
|
|
8217
8217
|
|
|
8218
|
+
/**
|
|
8219
|
+
* @license
|
|
8220
|
+
* Copyright 2023 Google LLC
|
|
8221
|
+
*
|
|
8222
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8223
|
+
* you may not use this file except in compliance with the License.
|
|
8224
|
+
* You may obtain a copy of the License at
|
|
8225
|
+
*
|
|
8226
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8227
|
+
*
|
|
8228
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8229
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8230
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8231
|
+
* See the License for the specific language governing permissions and
|
|
8232
|
+
* limitations under the License.
|
|
8233
|
+
*/
|
|
8234
|
+
function publicKeyCredentialToJSON(pubKeyCred) {
|
|
8235
|
+
// Convert ArrayBuffer to Base64
|
|
8236
|
+
function bufferToBase64(buffer) {
|
|
8237
|
+
var byteArray = Array.from(new Uint8Array(buffer));
|
|
8238
|
+
return btoa(String.fromCharCode.apply(null, byteArray));
|
|
8239
|
+
}
|
|
8240
|
+
var clientDataJSON = bufferToBase64(pubKeyCred.response.clientDataJSON);
|
|
8241
|
+
var result = {};
|
|
8242
|
+
// Handle Attestation Response (Registration)
|
|
8243
|
+
if (pubKeyCred.response instanceof AuthenticatorAttestationResponse) {
|
|
8244
|
+
var attestationObject = bufferToBase64(pubKeyCred.response.attestationObject);
|
|
8245
|
+
result = {
|
|
8246
|
+
id: pubKeyCred.id,
|
|
8247
|
+
type: pubKeyCred.type,
|
|
8248
|
+
rawId: bufferToBase64(pubKeyCred.rawId),
|
|
8249
|
+
response: {
|
|
8250
|
+
clientDataJSON: clientDataJSON,
|
|
8251
|
+
attestationObject: attestationObject
|
|
8252
|
+
}
|
|
8253
|
+
};
|
|
8254
|
+
}
|
|
8255
|
+
// Handle Assertion Response (Authentication)
|
|
8256
|
+
if (pubKeyCred.response instanceof AuthenticatorAssertionResponse) {
|
|
8257
|
+
var authenticatorData = bufferToBase64(pubKeyCred.response.authenticatorData);
|
|
8258
|
+
var signature = bufferToBase64(pubKeyCred.response.signature);
|
|
8259
|
+
var userHandle = pubKeyCred.response.userHandle
|
|
8260
|
+
? bufferToBase64(pubKeyCred.response.userHandle)
|
|
8261
|
+
: undefined;
|
|
8262
|
+
result = {
|
|
8263
|
+
id: pubKeyCred.id,
|
|
8264
|
+
type: pubKeyCred.type,
|
|
8265
|
+
rawId: bufferToBase64(pubKeyCred.rawId),
|
|
8266
|
+
response: {
|
|
8267
|
+
clientDataJSON: clientDataJSON,
|
|
8268
|
+
authenticatorData: authenticatorData,
|
|
8269
|
+
signature: signature,
|
|
8270
|
+
userHandle: userHandle
|
|
8271
|
+
}
|
|
8272
|
+
};
|
|
8273
|
+
}
|
|
8274
|
+
return result;
|
|
8275
|
+
}
|
|
8276
|
+
function startPasskeyEnrollment(auth, request) {
|
|
8277
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8278
|
+
return __generator(this, function (_a) {
|
|
8279
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/passkeyEnrollment:start" /* Endpoint.START_PASSKEY_ENROLLMENT */, _addTidIfNecessary(auth, request))];
|
|
8280
|
+
});
|
|
8281
|
+
});
|
|
8282
|
+
}
|
|
8283
|
+
function finalizePasskeyEnrollment(auth, request) {
|
|
8284
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8285
|
+
return __generator(this, function (_a) {
|
|
8286
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/passkeyEnrollment:finalize" /* Endpoint.FINALIZE_PASSKEY_ENROLLMENT */, _addTidIfNecessary(auth, request))];
|
|
8287
|
+
});
|
|
8288
|
+
});
|
|
8289
|
+
}
|
|
8290
|
+
function startPasskeySignIn(auth, request) {
|
|
8291
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8292
|
+
return __generator(this, function (_a) {
|
|
8293
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/passkeySignIn:start" /* Endpoint.START_PASSKEY_SIGNIN */, _addTidIfNecessary(auth, request))];
|
|
8294
|
+
});
|
|
8295
|
+
});
|
|
8296
|
+
}
|
|
8297
|
+
function finalizePasskeySignIn(auth, request) {
|
|
8298
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8299
|
+
return __generator(this, function (_a) {
|
|
8300
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts/passkeySignIn:finalize" /* Endpoint.FINALIZE_PASSKEY_SIGNIN */, _addTidIfNecessary(auth, request))];
|
|
8301
|
+
});
|
|
8302
|
+
});
|
|
8303
|
+
}
|
|
8304
|
+
function passkeyUnenroll(auth, request) {
|
|
8305
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8306
|
+
return __generator(this, function (_a) {
|
|
8307
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v1/accounts:update" /* Endpoint.SET_ACCOUNT_INFO */, request)];
|
|
8308
|
+
});
|
|
8309
|
+
});
|
|
8310
|
+
}
|
|
8311
|
+
|
|
8312
|
+
/**
|
|
8313
|
+
* @license
|
|
8314
|
+
* Copyright 2023 Google LLC
|
|
8315
|
+
*
|
|
8316
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8317
|
+
* you may not use this file except in compliance with the License.
|
|
8318
|
+
* You may obtain a copy of the License at
|
|
8319
|
+
*
|
|
8320
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8321
|
+
*
|
|
8322
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8323
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8324
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8325
|
+
* See the License for the specific language governing permissions and
|
|
8326
|
+
* limitations under the License.
|
|
8327
|
+
*/
|
|
8328
|
+
var DEFAULT_PASSKEY_ACCOUNT_NAME = 'Unnamed account (Web)';
|
|
8329
|
+
var PASSKEY_LOOK_UP_ERROR_MESSAGE = 'The operation either timed out or was not allowed.';
|
|
8330
|
+
/**
|
|
8331
|
+
* Signs in a user with a passkey. Use enrollPasskey to enroll a passkey credential for the current user.
|
|
8332
|
+
* @param auth - The Firebase Auth instance.
|
|
8333
|
+
* @param name - The user's name for passkey.
|
|
8334
|
+
* @param manualSignUp - When false, automatically creates an anonymous user if a passkey credential does not exist. Defaults to false.
|
|
8335
|
+
* @returns A promise that resolves with a `UserCredential` object.
|
|
8336
|
+
*/
|
|
8337
|
+
function signInWithPasskey(auth, name, manualSignUp) {
|
|
8338
|
+
if (manualSignUp === void 0) { manualSignUp = false; }
|
|
8339
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8340
|
+
var authInternal, startSignInRequest, startSignInResponse, options, credential, finalizeSignInRequest, finalizeSignInResponse, operationType, userCredential, error_1, userCredential, user;
|
|
8341
|
+
return __generator(this, function (_a) {
|
|
8342
|
+
switch (_a.label) {
|
|
8343
|
+
case 0:
|
|
8344
|
+
authInternal = _castAuth(auth);
|
|
8345
|
+
startSignInRequest = {};
|
|
8346
|
+
return [4 /*yield*/, startPasskeySignIn(authInternal, startSignInRequest)];
|
|
8347
|
+
case 1:
|
|
8348
|
+
startSignInResponse = _a.sent();
|
|
8349
|
+
options = getPasskeyCredentialRequestOptions(startSignInResponse);
|
|
8350
|
+
_a.label = 2;
|
|
8351
|
+
case 2:
|
|
8352
|
+
_a.trys.push([2, 7, , 10]);
|
|
8353
|
+
return [4 /*yield*/, navigator.credentials.get({
|
|
8354
|
+
publicKey: options
|
|
8355
|
+
})];
|
|
8356
|
+
case 3:
|
|
8357
|
+
credential = (_a.sent());
|
|
8358
|
+
finalizeSignInRequest = {
|
|
8359
|
+
authenticatorAuthenticationResponse: publicKeyCredentialToJSON(credential),
|
|
8360
|
+
name: name,
|
|
8361
|
+
displayName: name
|
|
8362
|
+
};
|
|
8363
|
+
return [4 /*yield*/, finalizePasskeySignIn(authInternal, finalizeSignInRequest)];
|
|
8364
|
+
case 4:
|
|
8365
|
+
finalizeSignInResponse = _a.sent();
|
|
8366
|
+
operationType = "signIn" /* OperationType.SIGN_IN */;
|
|
8367
|
+
return [4 /*yield*/, UserCredentialImpl._fromIdTokenResponse(authInternal, operationType, finalizeSignInResponse)];
|
|
8368
|
+
case 5:
|
|
8369
|
+
userCredential = _a.sent();
|
|
8370
|
+
return [4 /*yield*/, auth.updateCurrentUser(userCredential.user)];
|
|
8371
|
+
case 6:
|
|
8372
|
+
_a.sent();
|
|
8373
|
+
return [2 /*return*/, userCredential];
|
|
8374
|
+
case 7:
|
|
8375
|
+
error_1 = _a.sent();
|
|
8376
|
+
if (!(error_1.message.includes(PASSKEY_LOOK_UP_ERROR_MESSAGE) &&
|
|
8377
|
+
!manualSignUp)) return [3 /*break*/, 9];
|
|
8378
|
+
return [4 /*yield*/, signInAnonymously(authInternal)];
|
|
8379
|
+
case 8:
|
|
8380
|
+
userCredential = _a.sent();
|
|
8381
|
+
user = userCredential.user;
|
|
8382
|
+
return [2 /*return*/, enrollPasskey(user, name)];
|
|
8383
|
+
case 9: return [2 /*return*/, Promise.reject(error_1)];
|
|
8384
|
+
case 10: return [2 /*return*/];
|
|
8385
|
+
}
|
|
8386
|
+
});
|
|
8387
|
+
});
|
|
8388
|
+
}
|
|
8389
|
+
/**
|
|
8390
|
+
* Enrolls a passkey for the user account.
|
|
8391
|
+
* @param user - The user to enroll the passkey for.
|
|
8392
|
+
* @param name - The name associated with the passkey.
|
|
8393
|
+
* @returns A promise that resolves with a `UserCredential` object.
|
|
8394
|
+
* @public
|
|
8395
|
+
*/
|
|
8396
|
+
function enrollPasskey(user, name) {
|
|
8397
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8398
|
+
var userInternal, authInternal, idToken, startEnrollmentRequest, startEnrollmentResponse, options, credential, idToken_1, finalizeEnrollmentRequest, finalizeEnrollmentResponse, operationType, userCredential, err_1;
|
|
8399
|
+
return __generator(this, function (_a) {
|
|
8400
|
+
switch (_a.label) {
|
|
8401
|
+
case 0:
|
|
8402
|
+
userInternal = getModularInstance(user);
|
|
8403
|
+
authInternal = _castAuth(userInternal.auth);
|
|
8404
|
+
if (name === '') {
|
|
8405
|
+
name = DEFAULT_PASSKEY_ACCOUNT_NAME;
|
|
8406
|
+
}
|
|
8407
|
+
return [4 /*yield*/, userInternal.getIdToken()];
|
|
8408
|
+
case 1:
|
|
8409
|
+
idToken = _a.sent();
|
|
8410
|
+
startEnrollmentRequest = {
|
|
8411
|
+
idToken: idToken
|
|
8412
|
+
};
|
|
8413
|
+
return [4 /*yield*/, startPasskeyEnrollment(authInternal, startEnrollmentRequest)];
|
|
8414
|
+
case 2:
|
|
8415
|
+
startEnrollmentResponse = _a.sent();
|
|
8416
|
+
_a.label = 3;
|
|
8417
|
+
case 3:
|
|
8418
|
+
_a.trys.push([3, 8, , 9]);
|
|
8419
|
+
options = getPasskeyCredentialCreationOptions(startEnrollmentResponse, name);
|
|
8420
|
+
return [4 /*yield*/, navigator.credentials.create({
|
|
8421
|
+
publicKey: options
|
|
8422
|
+
})];
|
|
8423
|
+
case 4:
|
|
8424
|
+
credential = (_a.sent());
|
|
8425
|
+
return [4 /*yield*/, userInternal.getIdToken()];
|
|
8426
|
+
case 5:
|
|
8427
|
+
idToken_1 = _a.sent();
|
|
8428
|
+
finalizeEnrollmentRequest = {
|
|
8429
|
+
idToken: idToken_1,
|
|
8430
|
+
authenticatorRegistrationResponse: publicKeyCredentialToJSON(credential),
|
|
8431
|
+
name: name,
|
|
8432
|
+
displayName: name
|
|
8433
|
+
};
|
|
8434
|
+
return [4 /*yield*/, finalizePasskeyEnrollment(authInternal, finalizeEnrollmentRequest)];
|
|
8435
|
+
case 6:
|
|
8436
|
+
finalizeEnrollmentResponse = _a.sent();
|
|
8437
|
+
operationType = "link" /* OperationType.LINK */;
|
|
8438
|
+
return [4 /*yield*/, UserCredentialImpl._fromIdTokenResponse(userInternal.auth, operationType, finalizeEnrollmentResponse)];
|
|
8439
|
+
case 7:
|
|
8440
|
+
userCredential = _a.sent();
|
|
8441
|
+
return [2 /*return*/, userCredential];
|
|
8442
|
+
case 8:
|
|
8443
|
+
err_1 = _a.sent();
|
|
8444
|
+
return [2 /*return*/, Promise.reject(err_1)];
|
|
8445
|
+
case 9: return [2 /*return*/];
|
|
8446
|
+
}
|
|
8447
|
+
});
|
|
8448
|
+
});
|
|
8449
|
+
}
|
|
8450
|
+
/**
|
|
8451
|
+
* Unenrolls the passkey corresponding to the specified credentialId.
|
|
8452
|
+
* @param user - The user to unenroll the passkey for.
|
|
8453
|
+
* @param credentialId - The ID of the passkey to unenroll.
|
|
8454
|
+
* @returns A promise that resolves when the passkey is successfully unenrolled.
|
|
8455
|
+
* @public
|
|
8456
|
+
*/
|
|
8457
|
+
function unenrollPasskey(user, credentialId) {
|
|
8458
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8459
|
+
var userInternal, authInternal, idToken, request;
|
|
8460
|
+
return __generator(this, function (_a) {
|
|
8461
|
+
switch (_a.label) {
|
|
8462
|
+
case 0:
|
|
8463
|
+
userInternal = getModularInstance(user);
|
|
8464
|
+
authInternal = _castAuth(userInternal.auth);
|
|
8465
|
+
return [4 /*yield*/, userInternal.getIdToken()];
|
|
8466
|
+
case 1:
|
|
8467
|
+
idToken = _a.sent();
|
|
8468
|
+
request = {
|
|
8469
|
+
idToken: idToken,
|
|
8470
|
+
deletePasskey: [credentialId]
|
|
8471
|
+
};
|
|
8472
|
+
return [4 /*yield*/, passkeyUnenroll(authInternal, request)];
|
|
8473
|
+
case 2:
|
|
8474
|
+
_a.sent();
|
|
8475
|
+
return [2 /*return*/];
|
|
8476
|
+
}
|
|
8477
|
+
});
|
|
8478
|
+
});
|
|
8479
|
+
}
|
|
8480
|
+
// Converts an array of credential IDs of `excludeCredentials` field to an array of `PublicKeyCredentialDescriptor` objects.
|
|
8481
|
+
function convertExcludeCredentials(options) {
|
|
8482
|
+
function base64ToBuffer(base64) {
|
|
8483
|
+
var binaryStr = atob(base64);
|
|
8484
|
+
var len = binaryStr.length;
|
|
8485
|
+
var bytes = new Uint8Array(len);
|
|
8486
|
+
for (var i = 0; i < len; i++) {
|
|
8487
|
+
bytes[i] = binaryStr.charCodeAt(i);
|
|
8488
|
+
}
|
|
8489
|
+
return bytes.buffer;
|
|
8490
|
+
}
|
|
8491
|
+
if ('excludeCredentials' in options && options.excludeCredentials) {
|
|
8492
|
+
for (var _i = 0, _a = options.excludeCredentials; _i < _a.length; _i++) {
|
|
8493
|
+
var cred = _a[_i];
|
|
8494
|
+
if (typeof cred.id === 'string') {
|
|
8495
|
+
// Assuming Base64 encoded strings
|
|
8496
|
+
cred.id = base64ToBuffer(cred.id);
|
|
8497
|
+
}
|
|
8498
|
+
}
|
|
8499
|
+
}
|
|
8500
|
+
}
|
|
8501
|
+
function getPasskeyCredentialCreationOptions(response, name) {
|
|
8502
|
+
if (name === void 0) { name = ''; }
|
|
8503
|
+
var options = response.credentialCreationOptions;
|
|
8504
|
+
if (name === '') {
|
|
8505
|
+
name = 'Unnamed account (Web)';
|
|
8506
|
+
}
|
|
8507
|
+
options.user.name = name;
|
|
8508
|
+
options.user.displayName = name;
|
|
8509
|
+
var userId = options.user.id;
|
|
8510
|
+
options.user.id = Uint8Array.from(atob(userId), function (c) { return c.charCodeAt(0); });
|
|
8511
|
+
var rpId = window.location.hostname;
|
|
8512
|
+
options.rp.id = rpId;
|
|
8513
|
+
options.rp.name = rpId;
|
|
8514
|
+
var challengeBase64 = options.challenge;
|
|
8515
|
+
options.challenge = Uint8Array.from(atob(challengeBase64), function (c) {
|
|
8516
|
+
return c.charCodeAt(0);
|
|
8517
|
+
});
|
|
8518
|
+
convertExcludeCredentials(options);
|
|
8519
|
+
return options;
|
|
8520
|
+
}
|
|
8521
|
+
function getPasskeyCredentialRequestOptions(response, name) {
|
|
8522
|
+
var options = response.credentialRequestOptions;
|
|
8523
|
+
var rpId = window.location.hostname;
|
|
8524
|
+
options.rpId = rpId;
|
|
8525
|
+
var challengeBase64 = options.challenge;
|
|
8526
|
+
options.challenge = Uint8Array.from(atob(challengeBase64), function (c) {
|
|
8527
|
+
return c.charCodeAt(0);
|
|
8528
|
+
});
|
|
8529
|
+
convertExcludeCredentials(options);
|
|
8530
|
+
return options;
|
|
8531
|
+
}
|
|
8532
|
+
|
|
8218
8533
|
/**
|
|
8219
8534
|
* @license
|
|
8220
8535
|
* Copyright 2020 Google LLC
|
|
@@ -8321,9 +8636,7 @@ function updateProfile(user, _a) {
|
|
|
8321
8636
|
* @param user - The user.
|
|
8322
8637
|
* @param newEmail - The new email address.
|
|
8323
8638
|
*
|
|
8324
|
-
* Throws "auth/operation-not-allowed" error when
|
|
8325
|
-
* {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}
|
|
8326
|
-
* is enabled.
|
|
8639
|
+
* Throws "auth/operation-not-allowed" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
8327
8640
|
* Deprecated - Use {@link verifyBeforeUpdateEmail} instead.
|
|
8328
8641
|
*
|
|
8329
8642
|
* @public
|
|
@@ -9056,7 +9369,7 @@ function multiFactor(user) {
|
|
|
9056
9369
|
}
|
|
9057
9370
|
|
|
9058
9371
|
var name = "@firebase/auth";
|
|
9059
|
-
var version = "1.7.1-
|
|
9372
|
+
var version = "1.7.1-passkey-preview.103ead202";
|
|
9060
9373
|
|
|
9061
9374
|
/**
|
|
9062
9375
|
* @license
|
|
@@ -11274,5 +11587,5 @@ function generateNoEvent() {
|
|
|
11274
11587
|
};
|
|
11275
11588
|
}
|
|
11276
11589
|
|
|
11277
|
-
export { signInWithEmailAndPassword as $, ActionCodeOperation as A, PhoneAuthCredential as B, inMemoryPersistence as C, EmailAuthProvider as D, EmailAuthCredential as E, FactorId as F, FacebookAuthProvider as G, GoogleAuthProvider as H, GithubAuthProvider as I, OAuthProvider as J, SAMLAuthProvider as K, signInAnonymously as L, signInWithCredential as M, linkWithCredential as N, OperationType as O, ProviderId as P, reauthenticateWithCredential as Q, signInWithCustomToken as R, SignInMethod as S, TwitterAuthProvider as T, sendPasswordResetEmail as U, confirmPasswordReset as V, applyActionCode as W, checkActionCode as X, verifyPasswordResetCode as Y, createUserWithEmailAndPassword as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a,
|
|
11278
|
-
//# sourceMappingURL=popup_redirect-
|
|
11590
|
+
export { signInWithEmailAndPassword as $, ActionCodeOperation as A, PhoneAuthCredential as B, inMemoryPersistence as C, EmailAuthProvider as D, EmailAuthCredential as E, FactorId as F, FacebookAuthProvider as G, GoogleAuthProvider as H, GithubAuthProvider as I, OAuthProvider as J, SAMLAuthProvider as K, signInAnonymously as L, signInWithCredential as M, linkWithCredential as N, OperationType as O, ProviderId as P, reauthenticateWithCredential as Q, signInWithCustomToken as R, SignInMethod as S, TwitterAuthProvider as T, sendPasswordResetEmail as U, confirmPasswordReset as V, applyActionCode as W, checkActionCode as X, verifyPasswordResetCode as Y, createUserWithEmailAndPassword as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, finalizeEnrollPhoneMfa as a$, sendSignInLinkToEmail as a0, isSignInWithEmailLink as a1, signInWithEmailLink as a2, fetchSignInMethodsForEmail as a3, sendEmailVerification as a4, verifyBeforeUpdateEmail as a5, signInWithPasskey as a6, enrollPasskey as a7, unenrollPasskey as a8, ActionCodeURL as a9, _assertLinkedStatus as aA, sendPhoneVerificationCode as aB, startEnrollPhoneMfa as aC, _link$1 as aD, debugAssert as aE, _generateEventId as aF, AbstractPopupRedirectOperation as aG, _assertInstanceOf as aH, _withDefaultResolver as aI, FederatedAuthProvider as aJ, _fail as aK, _getProjectConfig as aL, _getCurrentUrl as aM, _gapiScriptUrl as aN, _emulatorUrl as aO, _isChromeIOS as aP, _isFirefox as aQ, _isIOSStandalone as aR, _getRedirectUrl as aS, _setWindowLocation as aT, _isMobileBrowser as aU, _isSafari as aV, _isIOS as aW, _getRedirectResult as aX, _overrideRedirectResult as aY, AuthEventManager as aZ, debugFail as a_, parseActionCodeURL as aa, updateProfile as ab, updateEmail as ac, updatePassword as ad, getIdToken as ae, getIdTokenResult as af, unlink as ag, getAdditionalUserInfo as ah, reload as ai, getMultiFactorResolver as aj, multiFactor as ak, _performApiRequest as al, _addTidIfNecessary as am, _assert as an, Delay as ao, _window as ap, isV2 as aq, _createError as ar, _recaptchaV2ScriptUrl as as, _loadJS as at, _generateCallbackName as au, getRecaptchaParams as av, _isHttpOrHttps as aw, _isWorker as ax, _castAuth as ay, _serverAppCurrentUserOperationNotSupportedError as az, _linkWithRedirect as b, finalizeEnrollTotpMfa as b0, startEnrollTotpMfa as b1, _setExternalJSProvider as b2, _persistenceKeyName as b3, UserImpl as b4, _getInstance as b5, AuthImpl as b6, _getClientVersion as b7, FetchProvider as b8, SAMLAuthCredential as b9, signInWithRedirect as ba, linkWithRedirect as bb, reauthenticateWithRedirect as bc, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, initializeRecaptchaConfig as h, initializeAuth as i, beforeAuthStateChanged as j, onAuthStateChanged as k, updateCurrentUser as l, signOut as m, revokeAccessToken as n, onIdTokenChanged as o, deleteUser as p, debugErrorMap as q, registerAuth as r, setPersistence as s, prodErrorMap as t, useDeviceLanguage as u, validatePassword as v, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as w, connectAuthEmulator as x, AuthCredential as y, OAuthCredential as z };
|
|
11591
|
+
//# sourceMappingURL=popup_redirect-619ee864.js.map
|