summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth
diff options
context:
space:
mode:
Diffstat (limited to 'frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth')
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_event_manager.d.ts34
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_impl.d.ts133
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/emulator.d.ts42
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/firebase_internal.d.ts35
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/initialize.d.ts46
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/middleware.d.ts25
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/password_policy_impl.d.ts59
-rw-r--r--frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/register.d.ts23
8 files changed, 397 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_event_manager.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_event_manager.d.ts
new file mode 100644
index 0000000..42edbc6
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_event_manager.d.ts
@@ -0,0 +1,34 @@
+/**
+ * @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 { AuthEvent, AuthEventConsumer, EventManager } from '../../model/popup_redirect';
+import { AuthInternal } from '../../model/auth';
+export declare class AuthEventManager implements EventManager {
+ private readonly auth;
+ private readonly cachedEventUids;
+ private readonly consumers;
+ protected queuedRedirectEvent: AuthEvent | null;
+ protected hasHandledPotentialRedirect: boolean;
+ private lastProcessedEventTime;
+ constructor(auth: AuthInternal);
+ registerConsumer(authEventConsumer: AuthEventConsumer): void;
+ unregisterConsumer(authEventConsumer: AuthEventConsumer): void;
+ onEvent(event: AuthEvent): boolean;
+ private sendToConsumer;
+ private isEventForConsumer;
+ private hasEventBeenHandled;
+ private saveEventToCache;
+}
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_impl.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_impl.d.ts
new file mode 100644
index 0000000..87aab60
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/auth_impl.d.ts
@@ -0,0 +1,133 @@
+/**
+ * @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 { _FirebaseService, FirebaseApp } from '@firebase/app';
+import { Provider } from '@firebase/component';
+import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
+import { Auth, AuthErrorMap, AuthSettings, EmulatorConfig, NextOrObserver, Persistence, PopupRedirectResolver, User, CompleteFn, ErrorFn, Unsubscribe, PasswordValidationStatus } from '../../model/public_types';
+import { ErrorFactory } from '@firebase/util';
+import { AuthInternal, ConfigInternal } from '../../model/auth';
+import { PopupRedirectResolverInternal } from '../../model/popup_redirect';
+import { UserInternal } from '../../model/user';
+import { AuthErrorCode, AuthErrorParams } from '../errors';
+import { PersistenceInternal } from '../persistence';
+import { RecaptchaConfig } from '../../platform_browser/recaptcha/recaptcha';
+import { PasswordPolicyInternal } from '../../model/password_policy';
+export declare const enum DefaultConfig {
+ TOKEN_API_HOST = "securetoken.googleapis.com",
+ API_HOST = "identitytoolkit.googleapis.com",
+ API_SCHEME = "https"
+}
+export declare class AuthImpl implements AuthInternal, _FirebaseService {
+ readonly app: FirebaseApp;
+ private readonly heartbeatServiceProvider;
+ private readonly appCheckServiceProvider;
+ readonly config: ConfigInternal;
+ currentUser: User | null;
+ emulatorConfig: EmulatorConfig | null;
+ private operations;
+ private persistenceManager?;
+ private redirectPersistenceManager?;
+ private authStateSubscription;
+ private idTokenSubscription;
+ private readonly beforeStateQueue;
+ private redirectUser;
+ private isProactiveRefreshEnabled;
+ private readonly EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION;
+ _canInitEmulator: boolean;
+ _isInitialized: boolean;
+ _deleted: boolean;
+ _initializationPromise: Promise<void> | null;
+ _popupRedirectResolver: PopupRedirectResolverInternal | null;
+ _errorFactory: ErrorFactory<AuthErrorCode, AuthErrorParams>;
+ _agentRecaptchaConfig: RecaptchaConfig | null;
+ _tenantRecaptchaConfigs: Record<string, RecaptchaConfig>;
+ _projectPasswordPolicy: PasswordPolicyInternal | null;
+ _tenantPasswordPolicies: Record<string, PasswordPolicyInternal>;
+ _resolvePersistenceManagerAvailable: ((value: void | PromiseLike<void>) => void) | undefined;
+ _persistenceManagerAvailable: Promise<void>;
+ readonly name: string;
+ private lastNotifiedUid;
+ languageCode: string | null;
+ tenantId: string | null;
+ settings: AuthSettings;
+ constructor(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>, appCheckServiceProvider: Provider<AppCheckInternalComponentName>, config: ConfigInternal);
+ _initializeWithPersistence(persistenceHierarchy: PersistenceInternal[], popupRedirectResolver?: PopupRedirectResolver): Promise<void>;
+ /**
+ * If the persistence is changed in another window, the user manager will let us know
+ */
+ _onStorageEvent(): Promise<void>;
+ private initializeCurrentUserFromIdToken;
+ private initializeCurrentUser;
+ private tryRedirectSignIn;
+ private reloadAndSetCurrentUserOrClear;
+ useDeviceLanguage(): void;
+ _delete(): Promise<void>;
+ updateCurrentUser(userExtern: User | null): Promise<void>;
+ _updateCurrentUser(user: User | null, skipBeforeStateCallbacks?: boolean): Promise<void>;
+ signOut(): Promise<void>;
+ setPersistence(persistence: Persistence): Promise<void>;
+ _getRecaptchaConfig(): RecaptchaConfig | null;
+ validatePassword(password: string): Promise<PasswordValidationStatus>;
+ _getPasswordPolicyInternal(): PasswordPolicyInternal | null;
+ _updatePasswordPolicy(): Promise<void>;
+ _getPersistenceType(): string;
+ _getPersistence(): PersistenceInternal;
+ _updateErrorMap(errorMap: AuthErrorMap): void;
+ onAuthStateChanged(nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
+ beforeAuthStateChanged(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
+ onIdTokenChanged(nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
+ authStateReady(): Promise<void>;
+ /**
+ * Revokes the given access token. Currently only supports Apple OAuth access tokens.
+ */
+ revokeAccessToken(token: string): Promise<void>;
+ toJSON(): object;
+ _setRedirectUser(user: UserInternal | null, popupRedirectResolver?: PopupRedirectResolver): Promise<void>;
+ private getOrInitRedirectPersistenceManager;
+ _redirectUserForId(id: string): Promise<UserInternal | null>;
+ _persistUserIfCurrent(user: UserInternal): Promise<void>;
+ /** Notifies listeners only if the user is current */
+ _notifyListenersIfCurrent(user: UserInternal): void;
+ _key(): string;
+ _startProactiveRefresh(): void;
+ _stopProactiveRefresh(): void;
+ /** Returns the current user cast as the internal type */
+ get _currentUser(): UserInternal;
+ private notifyAuthListeners;
+ private registerStateListener;
+ /**
+ * Unprotected (from race conditions) method to set the current user. This
+ * should only be called from within a queued callback. This is necessary
+ * because the queue shouldn't rely on another queued callback.
+ */
+ private directlySetCurrentUser;
+ private queue;
+ private get assertedPersistence();
+ private frameworks;
+ private clientVersion;
+ _logFramework(framework: string): void;
+ _getFrameworks(): readonly string[];
+ _getAdditionalHeaders(): Promise<Record<string, string>>;
+ _getAppCheckToken(): Promise<string | undefined>;
+}
+/**
+ * Method to be used to cast down to our private implementation of Auth.
+ * It will also handle unwrapping from the compat type if necessary
+ *
+ * @param auth Auth object passed in from developer
+ */
+export declare function _castAuth(auth: Auth): AuthInternal;
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/emulator.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/emulator.d.ts
new file mode 100644
index 0000000..56dd81c
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/emulator.d.ts
@@ -0,0 +1,42 @@
+/**
+ * @license
+ * Copyright 2021 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 } from '../../model/public_types';
+/**
+ * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production
+ * Firebase Auth services.
+ *
+ * @remarks
+ * This must be called synchronously immediately following the first call to
+ * {@link initializeAuth}. Do not use with production credentials as emulator
+ * traffic is not encrypted.
+ *
+ *
+ * @example
+ * ```javascript
+ * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });
+ * ```
+ *
+ * @param auth - The {@link Auth} instance.
+ * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').
+ * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to
+ * `true` to disable the warning banner attached to the DOM.
+ *
+ * @public
+ */
+export declare function connectAuthEmulator(auth: Auth, url: string, options?: {
+ disableWarnings: boolean;
+}): void;
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/firebase_internal.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/firebase_internal.d.ts
new file mode 100644
index 0000000..9a68c98
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/firebase_internal.d.ts
@@ -0,0 +1,35 @@
+/**
+ * @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 { FirebaseAuthInternal } from '@firebase/auth-interop-types';
+import { AuthInternal } from '../../model/auth';
+interface TokenListener {
+ (tok: string | null): unknown;
+}
+export declare class AuthInterop implements FirebaseAuthInternal {
+ private readonly auth;
+ private readonly internalListeners;
+ constructor(auth: AuthInternal);
+ getUid(): string | null;
+ getToken(forceRefresh?: boolean): Promise<{
+ accessToken: string;
+ } | null>;
+ addAuthTokenListener(listener: TokenListener): void;
+ removeAuthTokenListener(listener: TokenListener): void;
+ private assertAuthConfigured;
+ private updateProactiveRefresh;
+}
+export {};
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/initialize.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/initialize.d.ts
new file mode 100644
index 0000000..3dd0e1e
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/initialize.d.ts
@@ -0,0 +1,46 @@
+/**
+ * @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 { FirebaseApp } from '@firebase/app';
+import { Auth, Dependencies } from '../../model/public_types';
+import { AuthImpl } from './auth_impl';
+/**
+ * Initializes an {@link Auth} instance with fine-grained control over
+ * {@link Dependencies}.
+ *
+ * @remarks
+ *
+ * This function allows more control over the {@link Auth} instance than
+ * {@link getAuth}. `getAuth` uses platform-specific defaults to supply
+ * the {@link Dependencies}. In general, `getAuth` is the easiest way to
+ * initialize Auth and works for most use cases. Use `initializeAuth` if you
+ * need control over which persistence layer is used, or to minimize bundle
+ * size if you're not using either `signInWithPopup` or `signInWithRedirect`.
+ *
+ * For example, if your app only uses anonymous accounts and you only want
+ * accounts saved for the current session, initialize `Auth` with:
+ *
+ * ```js
+ * const auth = initializeAuth(app, {
+ * persistence: browserSessionPersistence,
+ * popupRedirectResolver: undefined,
+ * });
+ * ```
+ *
+ * @public
+ */
+export declare function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth;
+export declare function _initializeAuthInstance(auth: AuthImpl, deps?: Dependencies): void;
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/middleware.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/middleware.d.ts
new file mode 100644
index 0000000..74c4183
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/middleware.d.ts
@@ -0,0 +1,25 @@
+/**
+ * @license
+ * Copyright 2022 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 { AuthInternal } from '../../model/auth';
+import { Unsubscribe, User } from '../../model/public_types';
+export declare class AuthMiddlewareQueue {
+ private readonly auth;
+ private readonly queue;
+ constructor(auth: AuthInternal);
+ pushCallback(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
+ runMiddleware(nextUser: User | null): Promise<void>;
+}
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/password_policy_impl.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/password_policy_impl.d.ts
new file mode 100644
index 0000000..45a8127
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/password_policy_impl.d.ts
@@ -0,0 +1,59 @@
+/**
+ * @license
+ * Copyright 2023 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 { GetPasswordPolicyResponse } from '../../api/password_policy/get_password_policy';
+import { PasswordPolicyCustomStrengthOptions, PasswordPolicyInternal } from '../../model/password_policy';
+import { PasswordValidationStatus } from '../../model/public_types';
+/**
+ * Stores password policy requirements and provides password validation against the policy.
+ *
+ * @internal
+ */
+export declare class PasswordPolicyImpl implements PasswordPolicyInternal {
+ readonly customStrengthOptions: PasswordPolicyCustomStrengthOptions;
+ readonly allowedNonAlphanumericCharacters: string;
+ readonly enforcementState: string;
+ readonly forceUpgradeOnSignin: boolean;
+ readonly schemaVersion: number;
+ constructor(response: GetPasswordPolicyResponse);
+ validatePassword(password: string): PasswordValidationStatus;
+ /**
+ * Validates that the password meets the length options for the policy.
+ *
+ * @param password Password to validate.
+ * @param status Validation status.
+ */
+ private validatePasswordLengthOptions;
+ /**
+ * Validates that the password meets the character options for the policy.
+ *
+ * @param password Password to validate.
+ * @param status Validation status.
+ */
+ private validatePasswordCharacterOptions;
+ /**
+ * Updates the running validation status with the statuses for the character options.
+ * Expected to be called each time a character is processed to update each option status
+ * based on the current character.
+ *
+ * @param status Validation status.
+ * @param containsLowercaseCharacter Whether the character is a lowercase letter.
+ * @param containsUppercaseCharacter Whether the character is an uppercase letter.
+ * @param containsNumericCharacter Whether the character is a numeric character.
+ * @param containsNonAlphanumericCharacter Whether the character is a non-alphanumeric character.
+ */
+ private updatePasswordCharacterOptionsStatuses;
+}
diff --git a/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/register.d.ts b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/register.d.ts
new file mode 100644
index 0000000..260c739
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/auth/dist/node/src/core/auth/register.d.ts
@@ -0,0 +1,23 @@
+/**
+ * @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 { ClientPlatform } from '../util/version';
+export declare const enum _ComponentName {
+ AUTH = "auth",
+ AUTH_INTERNAL = "auth-internal"
+}
+/** @internal */
+export declare function registerAuth(clientPlatform: ClientPlatform): void;