@firebase/auth 1.3.0-canary.eff95304d → 1.3.0-canary.f002ef36a
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 +25 -4
- package/dist/auth.d.ts +25 -4
- package/dist/browser-cjs/{index-bbdc1888.js → index-3d97c204.js} +133 -127
- package/dist/browser-cjs/index-3d97c204.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/browser-cjs/src/api/index.d.ts +10 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-f62a8012.js → popup_redirect-9281c39f.js} +183 -214
- package/dist/cordova/popup_redirect-9281c39f.js.map +1 -0
- package/dist/cordova/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/cordova/src/api/index.d.ts +10 -0
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/esm2017/{index-2e980710.js → index-3000f55e.js} +133 -127
- package/dist/esm2017/index-3000f55e.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/esm2017/src/api/index.d.ts +10 -0
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/esm5/{index-ad762403.js → index-764f9bd9.js} +183 -214
- package/dist/esm5/index-764f9bd9.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/esm5/src/api/index.d.ts +10 -0
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/index.webworker.esm5.js +141 -172
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/node/src/api/index.d.ts +10 -0
- package/dist/node/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/node/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/node/{totp-99dfc228.js → totp-359f3930.js} +179 -210
- package/dist/node/totp-359f3930.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/authentication/recaptcha.d.ts +2 -2
- package/dist/node-esm/src/api/index.d.ts +10 -0
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/node-esm/{totp-6a7976b7.js → totp-3e8532c1.js} +129 -123
- package/dist/node-esm/totp-3e8532c1.js.map +1 -0
- package/dist/rn/{index-1737b0ce.js → index-fef1349d.js} +183 -214
- package/dist/rn/index-fef1349d.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/rn/src/api/index.d.ts +10 -0
- package/dist/rn/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/dist/src/api/authentication/recaptcha.d.ts +2 -2
- package/dist/src/api/index.d.ts +10 -0
- package/dist/src/platform_browser/recaptcha/recaptcha.d.ts +18 -3
- package/dist/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +3 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-bbdc1888.js.map +0 -1
- package/dist/cordova/popup_redirect-f62a8012.js.map +0 -1
- package/dist/esm2017/index-2e980710.js.map +0 -1
- package/dist/esm5/index-ad762403.js.map +0 -1
- package/dist/node/totp-99dfc228.js.map +0 -1
- package/dist/node-esm/totp-6a7976b7.js.map +0 -1
- package/dist/rn/index-1737b0ce.js.map +0 -1
package/dist/esm2017/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ah as ActionCodeURL, K as AuthCredential, H as AuthErrorCodes, L as EmailAuthCredential, U as EmailAuthProvider, V as FacebookAuthProvider, F as FactorId, X as GithubAuthProvider, W as GoogleAuthProvider, M as OAuthCredential, Y as OAuthProvider, O as OperationType, N as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Z as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, _ as TwitterAuthProvider, a6 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a7 as checkActionCode, a5 as confirmPasswordReset, J as connectAuthEmulator, a9 as createUserWithEmailAndPassword, E as debugErrorMap, D as deleteUser, ae as fetchSignInMethodsForEmail, ap as getAdditionalUserInfo, o as getAuth, am as getIdToken, an as getIdTokenResult, ar as getMultiFactorResolver, j as getRedirectResult, Q as inMemoryPersistence, i as indexedDBLocalPersistence, I as initializeAuth, t as initializeRecaptchaConfig, ac as isSignInWithEmailLink, a1 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, as as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, ai as parseActionCodeURL, G as prodErrorMap, a2 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, aq as reload, af as sendEmailVerification, a4 as sendPasswordResetEmail, ab as sendSignInLinkToEmail, q as setPersistence, $ as signInAnonymously, a0 as signInWithCredential, a3 as signInWithCustomToken, aa as signInWithEmailAndPassword, ad as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ao as unlink, B as updateCurrentUser, ak as updateEmail, al as updatePassword, u as updatePhoneNumber, aj as updateProfile, z as useDeviceLanguage, v as validatePassword, ag as verifyBeforeUpdateEmail, a8 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ah as ActionCodeURL, K as AuthCredential, H as AuthErrorCodes, L as EmailAuthCredential, U as EmailAuthProvider, V as FacebookAuthProvider, F as FactorId, X as GithubAuthProvider, W as GoogleAuthProvider, M as OAuthCredential, Y as OAuthProvider, O as OperationType, N as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Z as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, _ as TwitterAuthProvider, a6 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a7 as checkActionCode, a5 as confirmPasswordReset, J as connectAuthEmulator, a9 as createUserWithEmailAndPassword, E as debugErrorMap, D as deleteUser, ae as fetchSignInMethodsForEmail, ap as getAdditionalUserInfo, o as getAuth, am as getIdToken, an as getIdTokenResult, ar as getMultiFactorResolver, j as getRedirectResult, Q as inMemoryPersistence, i as indexedDBLocalPersistence, I as initializeAuth, t as initializeRecaptchaConfig, ac as isSignInWithEmailLink, a1 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, as as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, ai as parseActionCodeURL, G as prodErrorMap, a2 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, aq as reload, af as sendEmailVerification, a4 as sendPasswordResetEmail, ab as sendSignInLinkToEmail, q as setPersistence, $ as signInAnonymously, a0 as signInWithCredential, a3 as signInWithCustomToken, aa as signInWithEmailAndPassword, ad as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ao as unlink, B as updateCurrentUser, ak as updateEmail, al as updatePassword, u as updatePhoneNumber, aj as updateProfile, z as useDeviceLanguage, v as validatePassword, ag as verifyBeforeUpdateEmail, a8 as verifyPasswordResetCode } from './index-3000f55e.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
4
|
import '@firebase/logger';
|
package/dist/esm2017/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { at as debugAssert, au as _isIOS, av as _isAndroid, aw as _fail, ax as _getRedirectUrl, ay as _getProjectConfig, az as _isIOS7Or8, aA as _createError, aB as _assert, aC as AuthEventManager, aD as _getInstance, b as browserLocalPersistence, aE as _persistenceKeyName, a as browserSessionPersistence, aF as _getRedirectResult, aG as _overrideRedirectResult, aH as _clearRedirectOutcomes, aI as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ah as ActionCodeURL, K as AuthCredential, H as AuthErrorCodes, aK as AuthImpl, aN as AuthPopup, L as EmailAuthCredential, U as EmailAuthProvider, V as FacebookAuthProvider, F as FactorId, aO as FetchProvider, X as GithubAuthProvider, W as GoogleAuthProvider, M as OAuthCredential, Y as OAuthProvider, O as OperationType, N as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aP as SAMLAuthCredential, Z as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, _ as TwitterAuthProvider, aJ as UserImpl, aB as _assert, aI as _castAuth, aw as _fail, aM as _generateEventId, aL as _getClientVersion, aD as _getInstance, aF as _getRedirectResult, aG as _overrideRedirectResult, aE as _persistenceKeyName, a6 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a7 as checkActionCode, a5 as confirmPasswordReset, J as connectAuthEmulator, a9 as createUserWithEmailAndPassword, E as debugErrorMap, D as deleteUser, ae as fetchSignInMethodsForEmail, ap as getAdditionalUserInfo, o as getAuth, am as getIdToken, an as getIdTokenResult, ar as getMultiFactorResolver, j as getRedirectResult, Q as inMemoryPersistence, i as indexedDBLocalPersistence, I as initializeAuth, t as initializeRecaptchaConfig, ac as isSignInWithEmailLink, a1 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, as as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, ai as parseActionCodeURL, G as prodErrorMap, a2 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, aq as reload, af as sendEmailVerification, a4 as sendPasswordResetEmail, ab as sendSignInLinkToEmail, q as setPersistence, $ as signInAnonymously, a0 as signInWithCredential, a3 as signInWithCustomToken, aa as signInWithEmailAndPassword, ad as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ao as unlink, B as updateCurrentUser, ak as updateEmail, al as updatePassword, u as updatePhoneNumber, aj as updateProfile, z as useDeviceLanguage, v as validatePassword, ag as verifyBeforeUpdateEmail, a8 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { at as debugAssert, au as _isIOS, av as _isAndroid, aw as _fail, ax as _getRedirectUrl, ay as _getProjectConfig, az as _isIOS7Or8, aA as _createError, aB as _assert, aC as AuthEventManager, aD as _getInstance, b as browserLocalPersistence, aE as _persistenceKeyName, a as browserSessionPersistence, aF as _getRedirectResult, aG as _overrideRedirectResult, aH as _clearRedirectOutcomes, aI as _castAuth } from './index-3000f55e.js';
|
|
2
|
+
export { A as ActionCodeOperation, ah as ActionCodeURL, K as AuthCredential, H as AuthErrorCodes, aK as AuthImpl, aN as AuthPopup, L as EmailAuthCredential, U as EmailAuthProvider, V as FacebookAuthProvider, F as FactorId, aO as FetchProvider, X as GithubAuthProvider, W as GoogleAuthProvider, M as OAuthCredential, Y as OAuthProvider, O as OperationType, N as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aP as SAMLAuthCredential, Z as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, _ as TwitterAuthProvider, aJ as UserImpl, aB as _assert, aI as _castAuth, aw as _fail, aM as _generateEventId, aL as _getClientVersion, aD as _getInstance, aF as _getRedirectResult, aG as _overrideRedirectResult, aE as _persistenceKeyName, a6 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a7 as checkActionCode, a5 as confirmPasswordReset, J as connectAuthEmulator, a9 as createUserWithEmailAndPassword, E as debugErrorMap, D as deleteUser, ae as fetchSignInMethodsForEmail, ap as getAdditionalUserInfo, o as getAuth, am as getIdToken, an as getIdTokenResult, ar as getMultiFactorResolver, j as getRedirectResult, Q as inMemoryPersistence, i as indexedDBLocalPersistence, I as initializeAuth, t as initializeRecaptchaConfig, ac as isSignInWithEmailLink, a1 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, as as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, ai as parseActionCodeURL, G as prodErrorMap, a2 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, aq as reload, af as sendEmailVerification, a4 as sendPasswordResetEmail, ab as sendSignInLinkToEmail, q as setPersistence, $ as signInAnonymously, a0 as signInWithCredential, a3 as signInWithCustomToken, aa as signInWithEmailAndPassword, ad as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ao as unlink, B as updateCurrentUser, ak as updateEmail, al as updatePassword, u as updatePhoneNumber, aj as updateProfile, z as useDeviceLanguage, v as validatePassword, ag as verifyBeforeUpdateEmail, a8 as verifyPasswordResetCode } from './index-3000f55e.js';
|
|
3
3
|
import { querystringDecode } from '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
|
5
5
|
import '@firebase/logger';
|
|
@@ -22,13 +22,13 @@ interface GetRecaptchaConfigRequest {
|
|
|
22
22
|
clientType?: RecaptchaClientType;
|
|
23
23
|
version?: RecaptchaVersion;
|
|
24
24
|
}
|
|
25
|
-
interface
|
|
25
|
+
export interface RecaptchaEnforcementProviderState {
|
|
26
26
|
provider: string;
|
|
27
27
|
enforcementState: string;
|
|
28
28
|
}
|
|
29
29
|
export interface GetRecaptchaConfigResponse {
|
|
30
30
|
recaptchaKey: string;
|
|
31
|
-
recaptchaEnforcementState:
|
|
31
|
+
recaptchaEnforcementState: RecaptchaEnforcementProviderState[];
|
|
32
32
|
}
|
|
33
33
|
export declare function getRecaptchaConfig(auth: Auth, request: GetRecaptchaConfigRequest): Promise<GetRecaptchaConfigResponse>;
|
|
34
34
|
export {};
|
|
@@ -69,6 +69,15 @@ export declare const enum RecaptchaActionName {
|
|
|
69
69
|
GET_OOB_CODE = "getOobCode",
|
|
70
70
|
SIGN_UP_PASSWORD = "signUpPassword"
|
|
71
71
|
}
|
|
72
|
+
export declare const enum EnforcementState {
|
|
73
|
+
ENFORCE = "ENFORCE",
|
|
74
|
+
AUDIT = "AUDIT",
|
|
75
|
+
OFF = "OFF",
|
|
76
|
+
ENFORCEMENT_STATE_UNSPECIFIED = "ENFORCEMENT_STATE_UNSPECIFIED"
|
|
77
|
+
}
|
|
78
|
+
export declare const enum RecaptchaProvider {
|
|
79
|
+
EMAIL_PASSWORD_PROVIDER = "EMAIL_PASSWORD_PROVIDER"
|
|
80
|
+
}
|
|
72
81
|
export declare const DEFAULT_API_TIMEOUT_MS: Delay;
|
|
73
82
|
export declare function _addTidIfNecessary<T extends {
|
|
74
83
|
tenantId?: string;
|
|
@@ -77,6 +86,7 @@ export declare function _performApiRequest<T, V>(auth: Auth, method: HttpMethod,
|
|
|
77
86
|
export declare function _performFetchWithErrorHandling<V>(auth: Auth, customErrorMap: Partial<ServerErrorMap<ServerError>>, fetchFn: () => Promise<Response>): Promise<V>;
|
|
78
87
|
export declare function _performSignInRequest<T, V extends IdTokenResponse>(auth: Auth, method: HttpMethod, path: Endpoint, request?: T, customErrorMap?: Partial<ServerErrorMap<ServerError>>): Promise<V>;
|
|
79
88
|
export declare function _getFinalTarget(auth: Auth, host: string, path: string, query: string): string;
|
|
89
|
+
export declare function _parseEnforcementState(enforcementStateStr: string): EnforcementState;
|
|
80
90
|
interface PotentialResponse extends IdTokenResponse {
|
|
81
91
|
email?: string;
|
|
82
92
|
phoneNumber?: string;
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { RecaptchaParameters } from '../../model/public_types';
|
|
18
|
-
import { GetRecaptchaConfigResponse } from '../../api/authentication/recaptcha';
|
|
18
|
+
import { GetRecaptchaConfigResponse, RecaptchaEnforcementProviderState } from '../../api/authentication/recaptcha';
|
|
19
|
+
import { EnforcementState } from '../../api/index';
|
|
19
20
|
export interface Recaptcha {
|
|
20
21
|
render: (container: HTMLElement, parameters: RecaptchaParameters) => number;
|
|
21
22
|
getResponse: (id: number) => string;
|
|
@@ -49,8 +50,22 @@ export declare class RecaptchaConfig {
|
|
|
49
50
|
*/
|
|
50
51
|
siteKey: string;
|
|
51
52
|
/**
|
|
52
|
-
* The
|
|
53
|
+
* The list of providers and their enablement status for reCAPTCHA Enterprise.
|
|
53
54
|
*/
|
|
54
|
-
|
|
55
|
+
recaptchaEnforcementState: RecaptchaEnforcementProviderState[];
|
|
55
56
|
constructor(response: GetRecaptchaConfigResponse);
|
|
57
|
+
/**
|
|
58
|
+
* Returns the reCAPTCHA Enterprise enforcement state for the given provider.
|
|
59
|
+
*
|
|
60
|
+
* @param providerStr - The provider whose enforcement state is to be returned.
|
|
61
|
+
* @returns The reCAPTCHA Enterprise enforcement state for the given provider.
|
|
62
|
+
*/
|
|
63
|
+
getProviderEnforcementState(providerStr: string): EnforcementState | null;
|
|
64
|
+
/**
|
|
65
|
+
* Returns true if the reCAPTCHA Enterprise enforcement state for the provider is set to ENFORCE or AUDIT.
|
|
66
|
+
*
|
|
67
|
+
* @param providerStr - The provider whose enablement state is to be returned.
|
|
68
|
+
* @returns Whether or not reCAPTCHA Enterprise protection is enabled for the given provider.
|
|
69
|
+
*/
|
|
70
|
+
isProviderEnabled(providerStr: string): boolean;
|
|
56
71
|
}
|
|
@@ -39,4 +39,7 @@ export declare class RecaptchaEnterpriseVerifier {
|
|
|
39
39
|
verify(action?: string, forceRefresh?: boolean): Promise<string>;
|
|
40
40
|
}
|
|
41
41
|
export declare function injectRecaptchaFields<T>(auth: AuthInternal, request: T, action: RecaptchaActionName, captchaResp?: boolean): Promise<T>;
|
|
42
|
+
declare type ActionMethod<TRequest, TResponse> = (auth: Auth, request: TRequest) => Promise<TResponse>;
|
|
43
|
+
export declare function handleRecaptchaFlow<TRequest, TResponse>(authInstance: AuthInternal, request: TRequest, actionName: RecaptchaActionName, actionMethod: ActionMethod<TRequest, TResponse>): Promise<TResponse>;
|
|
42
44
|
export declare function _initializeRecaptchaConfig(auth: Auth): Promise<void>;
|
|
45
|
+
export {};
|