diff options
Diffstat (limited to 'frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies')
3 files changed, 0 insertions, 401 deletions
diff --git a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/phone.d.ts b/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/phone.d.ts deleted file mode 100644 index 26dab0b..0000000 --- a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/phone.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ApplicationVerifier, Auth, ConfirmationResult, PhoneInfoOptions, User } from '../../model/public_types'; -import { ApplicationVerifierInternal } from '../../model/application_verifier'; -import { PhoneAuthCredential } from '../../core/credentials/phone'; -import { AuthInternal } from '../../model/auth'; -/** - * Asynchronously signs in using a phone number. - * - * @remarks - * This method sends a code via SMS to the given - * phone number, and returns a {@link ConfirmationResult}. After the user - * provides the code sent to their phone, call {@link ConfirmationResult.confirm} - * with the code to sign the user in. - * - * For abuse prevention, this method requires a {@link ApplicationVerifier}. - * This SDK includes an implementation based on reCAPTCHA v2, {@link RecaptchaVerifier}. - * This function can work on other platforms that do not support the - * {@link RecaptchaVerifier} (like React Native), but you need to use a - * third-party {@link ApplicationVerifier} implementation. - * - * If you've enabled project-level reCAPTCHA Enterprise bot protection in - * Enforce mode, you can omit the {@link ApplicationVerifier}. - * - * This method does not work in a Node.js environment or with {@link Auth} instances created with a - * {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // 'recaptcha-container' is the ID of an element in the DOM. - * const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container'); - * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier); - * // Obtain a verificationCode from the user. - * const credential = await confirmationResult.confirm(verificationCode); - * ``` - * - * @param auth - The {@link Auth} instance. - * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). - * @param appVerifier - The {@link ApplicationVerifier}. - * - * @public - */ -export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>; -/** - * Links the user account with the given phone number. - * - * @remarks - * This method does not work in a Node.js environment. - * - * @param user - The user. - * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). - * @param appVerifier - The {@link ApplicationVerifier}. - * - * @public - */ -export declare function linkWithPhoneNumber(user: User, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>; -/** - * Re-authenticates a user using a fresh phone credential. - * - * @remarks - * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. - * - * This method does not work in a Node.js environment or on any {@link User} signed in by - * {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}. - * - * @param user - The user. - * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). - * @param appVerifier - The {@link ApplicationVerifier}. - * - * @public - */ -export declare function reauthenticateWithPhoneNumber(user: User, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>; -/** - * Returns a verification ID to be used in conjunction with the SMS code that is sent. - * - */ -export declare function _verifyPhoneNumber(auth: AuthInternal, options: PhoneInfoOptions | string, verifier?: ApplicationVerifierInternal): Promise<string>; -/** - * Updates the user's phone number. - * - * @remarks - * This method does not work in a Node.js environment or on any {@link User} signed in by - * {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ``` - * // 'recaptcha-container' is the ID of an element in the DOM. - * const applicationVerifier = new RecaptchaVerifier('recaptcha-container'); - * const provider = new PhoneAuthProvider(auth); - * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier); - * // Obtain the verificationCode from the user. - * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode); - * await updatePhoneNumber(user, phoneCredential); - * ``` - * - * @param user - The user. - * @param credential - A credential authenticating the new phone number. - * - * @public - */ -export declare function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise<void>; -export declare function injectRecaptchaV2Token<T extends object>(auth: AuthInternal, request: T, recaptchaV2Verifier: ApplicationVerifierInternal): Promise<T>; diff --git a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/popup.d.ts b/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/popup.d.ts deleted file mode 100644 index 72ba03a..0000000 --- a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/popup.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from '../../model/public_types'; -import { Delay } from '../../core/util/delay'; -export declare const enum _Timeout { - AUTH_EVENT = 8000 -} -export declare const _POLL_WINDOW_CLOSE_TIMEOUT: Delay; -/** - * Authenticates a Firebase client using a popup-based OAuth authentication flow. - * - * @remarks - * If succeeds, returns the signed in user along with the provider's credential. If sign in was - * unsuccessful, returns an error object containing additional information about the error. - * - * This method does not work in a Node.js environment or with {@link Auth} instances created with a - * {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using a popup. - * const provider = new FacebookAuthProvider(); - * const result = await signInWithPopup(auth, provider); - * - * // The signed-in user info. - * const user = result.user; - * // This gives you a Facebook Access Token. - * const credential = provider.credentialFromResult(auth, result); - * const token = credential.accessToken; - * ``` - * - * @param auth - The {@link Auth} instance. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>; -/** - * Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based - * OAuth flow. - * - * @remarks - * If the reauthentication is successful, the returned result will contain the user and the - * provider's credential. - * - * This method does not work in a Node.js environment or on any {@link User} signed in by - * {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using a popup. - * const provider = new FacebookAuthProvider(); - * const result = await signInWithPopup(auth, provider); - * // Reauthenticate using a popup. - * await reauthenticateWithPopup(result.user, provider); - * ``` - * - * @param user - The user. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function reauthenticateWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>; -/** - * Links the authenticated provider to the user account using a pop-up based OAuth flow. - * - * @remarks - * If the linking is successful, the returned result will contain the user and the provider's credential. - * - * This method does not work in a Node.js environment. - * - * @example - * ```javascript - * // Sign in using some other provider. - * const result = await signInWithEmailAndPassword(auth, email, password); - * // Link using a popup. - * const provider = new FacebookAuthProvider(); - * await linkWithPopup(result.user, provider); - * ``` - * - * @param user - The user. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function linkWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>; diff --git a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/redirect.d.ts b/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/redirect.d.ts deleted file mode 100644 index d0a9ae5..0000000 --- a/frontend-old/node_modules/@firebase/auth/dist/web-extension-cjs/src/platform_browser/strategies/redirect.d.ts +++ /dev/null @@ -1,176 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from '../../model/public_types'; -/** - * Authenticates a Firebase client using a full-page redirect flow. - * - * @remarks - * To handle the results and errors for this operation, refer to {@link getRedirectResult}. - * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices - * | best practices} when using {@link signInWithRedirect}. - * - * This method does not work in a Node.js environment or with {@link Auth} instances created with a - * {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using a redirect. - * const provider = new FacebookAuthProvider(); - * // You can add additional scopes to the provider: - * provider.addScope('user_birthday'); - * // Start a sign in process for an unauthenticated user. - * await signInWithRedirect(auth, provider); - * // This will trigger a full page redirect away from your app - * - * // After returning from the redirect when your app initializes you can obtain the result - * const result = await getRedirectResult(auth); - * if (result) { - * // This is the signed-in user - * const user = result.user; - * // This gives you a Facebook Access Token. - * const credential = provider.credentialFromResult(auth, result); - * const token = credential.accessToken; - * } - * // As this API can be used for sign-in, linking and reauthentication, - * // check the operationType to determine what triggered this redirect - * // operation. - * const operationType = result.operationType; - * ``` - * - * @param auth - The {@link Auth} instance. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>; -export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>; -/** - * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow. - * @remarks - * To handle the results and errors for this operation, refer to {@link getRedirectResult}. - * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices - * | best practices} when using {@link reauthenticateWithRedirect}. - * - * This method does not work in a Node.js environment or with {@link Auth} instances - * created with a {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using a redirect. - * const provider = new FacebookAuthProvider(); - * const result = await signInWithRedirect(auth, provider); - * // This will trigger a full page redirect away from your app - * - * // After returning from the redirect when your app initializes you can obtain the result - * const result = await getRedirectResult(auth); - * // Reauthenticate using a redirect. - * await reauthenticateWithRedirect(result.user, provider); - * // This will again trigger a full page redirect away from your app - * - * // After returning from the redirect when your app initializes you can obtain the result - * const result = await getRedirectResult(auth); - * ``` - * - * @param user - The user. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>; -export declare function _reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>; -/** - * Links the {@link OAuthProvider} to the user account using a full-page redirect flow. - * @remarks - * To handle the results and errors for this operation, refer to {@link getRedirectResult}. - * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices - * | best practices} when using {@link linkWithRedirect}. - * - * This method does not work in a Node.js environment or with {@link Auth} instances - * created with a {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using some other provider. - * const result = await signInWithEmailAndPassword(auth, email, password); - * // Link using a redirect. - * const provider = new FacebookAuthProvider(); - * await linkWithRedirect(result.user, provider); - * // This will trigger a full page redirect away from your app - * - * // After returning from the redirect when your app initializes you can obtain the result - * const result = await getRedirectResult(auth); - * ``` - * - * @param user - The user. - * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. - * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>; -export declare function _linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>; -/** - * Returns a {@link UserCredential} from the redirect-based sign-in flow. - * - * @remarks - * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an - * error. If no redirect operation was called, returns `null`. - * - * This method does not work in a Node.js environment or with {@link Auth} instances created with a - * {@link @firebase/app#FirebaseServerApp}. - * - * @example - * ```javascript - * // Sign in using a redirect. - * const provider = new FacebookAuthProvider(); - * // You can add additional scopes to the provider: - * provider.addScope('user_birthday'); - * // Start a sign in process for an unauthenticated user. - * await signInWithRedirect(auth, provider); - * // This will trigger a full page redirect away from your app - * - * // After returning from the redirect when your app initializes you can obtain the result - * const result = await getRedirectResult(auth); - * if (result) { - * // This is the signed-in user - * const user = result.user; - * // This gives you a Facebook Access Token. - * const credential = provider.credentialFromResult(auth, result); - * const token = credential.accessToken; - * } - * // As this API can be used for sign-in, linking and reauthentication, - * // check the operationType to determine what triggered this redirect - * // operation. - * const operationType = result.operationType; - * ``` - * - * @param auth - The {@link Auth} instance. - * @param resolver - An instance of {@link PopupRedirectResolver}, optional - * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * @public - */ -export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise<UserCredential | null>; -export declare function _getRedirectResult(auth: Auth, resolverExtern?: PopupRedirectResolver, bypassAuthState?: boolean): Promise<UserCredential | null>; |
