Initial Commit

This commit is contained in:
2026-03-06 04:54:20 -04:00
commit 63677bfcf5
9332 changed files with 1507319 additions and 0 deletions

5
node_modules/@firebase/auth-compat/README.md generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# @firebase/auth-compat
This is a compatability layer to for the Firebase Authentication SDK
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

View File

@@ -0,0 +1,112 @@
/**
* @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 * as types from '@firebase/auth-types';
declare module '@firebase/component' {
interface NameServiceMapping {
'auth-compat': types.FirebaseAuth;
}
}
declare module '@firebase/app-compat' {
interface FirebaseNamespace {
auth: {
(app?: FirebaseApp): types.FirebaseAuth;
Auth: typeof types.FirebaseAuth;
EmailAuthProvider: typeof types.EmailAuthProvider;
EmailAuthProvider_Instance: typeof types.EmailAuthProvider_Instance;
FacebookAuthProvider: typeof types.FacebookAuthProvider;
FacebookAuthProvider_Instance: typeof types.FacebookAuthProvider_Instance;
GithubAuthProvider: typeof types.GithubAuthProvider;
GithubAuthProvider_Instance: typeof types.GithubAuthProvider_Instance;
GoogleAuthProvider: typeof types.GoogleAuthProvider;
GoogleAuthProvider_Instance: typeof types.GoogleAuthProvider_Instance;
OAuthProvider: typeof types.OAuthProvider;
SAMLAuthProvider: typeof types.SAMLAuthProvider;
PhoneAuthProvider: typeof types.PhoneAuthProvider;
PhoneAuthProvider_Instance: typeof types.PhoneAuthProvider_Instance;
PhoneMultiFactorGenerator: typeof types.PhoneMultiFactorGenerator;
RecaptchaVerifier: typeof types.RecaptchaVerifier;
RecaptchaVerifier_Instance: typeof types.RecaptchaVerifier_Instance;
TwitterAuthProvider: typeof types.TwitterAuthProvider;
TwitterAuthProvider_Instance: typeof types.TwitterAuthProvider_Instance;
};
}
interface FirebaseApp {
auth?(): types.FirebaseAuth;
}
}
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
import { type User, type Unsubscribe, type ActionCodeInfo, type UserCredential, type Auth, type IdTokenResult, type MultiFactorError, type MultiFactorResolver, type PopupRedirectResolver, type Dependencies, type AuthCredential, type ApplicationVerifier, type ConfirmationResult, type AuthProvider, type MultiFactorUser, type NextOrObserver, type ErrorFn, type CompleteFn, type ActionCodeSettings, type Persistence, type PhoneAuthCredential, type PasswordValidationStatus } from "@firebase/auth";
declare module "@firebase/auth" {
function applyActionCode(auth: types.FirebaseAuth, oobCode: string): Promise<void>;
function beforeAuthStateChanged(auth: types.FirebaseAuth, callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
function checkActionCode(auth: types.FirebaseAuth, oobCode: string): Promise<ActionCodeInfo>;
function confirmPasswordReset(auth: types.FirebaseAuth, oobCode: string, newPassword: string): Promise<void>;
function connectAuthEmulator(auth: types.FirebaseAuth, url: string, options?: {
disableWarnings: boolean;
}): void;
function createUserWithEmailAndPassword(auth: types.FirebaseAuth, email: string, password: string): Promise<UserCredential>;
function deleteUser(user: types.User): Promise<void>;
function fetchSignInMethodsForEmail(auth: types.FirebaseAuth, email: string): Promise<string[]>;
function getAuth(app?: FirebaseAppCompat): Auth;
function getIdToken(user: types.User, forceRefresh?: boolean): Promise<string>;
function getIdTokenResult(user: types.User, forceRefresh?: boolean): Promise<IdTokenResult>;
function getMultiFactorResolver(auth: types.FirebaseAuth, error: MultiFactorError): MultiFactorResolver;
function getRedirectResult(auth: types.FirebaseAuth, resolver?: PopupRedirectResolver): Promise<UserCredential | null>;
function initializeAuth(app: FirebaseAppCompat, deps?: Dependencies): Auth;
function initializeRecaptchaConfig(auth: types.FirebaseAuth): Promise<void>;
function isSignInWithEmailLink(auth: types.FirebaseAuth, emailLink: string): boolean;
function linkWithCredential(user: types.User, credential: AuthCredential): Promise<UserCredential>;
function linkWithPhoneNumber(user: types.User, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
function linkWithPopup(user: types.User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
function linkWithRedirect(user: types.User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
function multiFactor(user: types.User): MultiFactorUser;
function onAuthStateChanged(auth: types.FirebaseAuth, nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
function onIdTokenChanged(auth: types.FirebaseAuth, nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
function reauthenticateWithCredential(user: types.User, credential: AuthCredential): Promise<UserCredential>;
function reauthenticateWithPhoneNumber(user: types.User, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
function reauthenticateWithPopup(user: types.User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
function reauthenticateWithRedirect(user: types.User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
function reload(user: types.User): Promise<void>;
function revokeAccessToken(auth: types.FirebaseAuth, token: string): Promise<void>;
function sendEmailVerification(user: types.User, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
function sendPasswordResetEmail(auth: types.FirebaseAuth, email: string, actionCodeSettings?: ActionCodeSettings): Promise<void>;
function sendSignInLinkToEmail(auth: types.FirebaseAuth, email: string, actionCodeSettings: ActionCodeSettings): Promise<void>;
function setPersistence(auth: types.FirebaseAuth, persistence: Persistence): Promise<void>;
function signInAnonymously(auth: types.FirebaseAuth): Promise<UserCredential>;
function signInWithCredential(auth: types.FirebaseAuth, credential: AuthCredential): Promise<UserCredential>;
function signInWithCustomToken(auth: types.FirebaseAuth, customToken: string): Promise<UserCredential>;
function signInWithEmailAndPassword(auth: types.FirebaseAuth, email: string, password: string): Promise<UserCredential>;
function signInWithEmailLink(auth: types.FirebaseAuth, email: string, emailLink?: string): Promise<UserCredential>;
function signInWithPhoneNumber(auth: types.FirebaseAuth, phoneNumber: string, appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
function signInWithPopup(auth: types.FirebaseAuth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
function signInWithRedirect(auth: types.FirebaseAuth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
function signOut(auth: types.FirebaseAuth): Promise<void>;
function unlink(user: types.User, providerId: string): Promise<User>;
function updateCurrentUser(auth: types.FirebaseAuth, user: User | null): Promise<void>;
function updateEmail(user: types.User, newEmail: string): Promise<void>;
function updatePassword(user: types.User, newPassword: string): Promise<void>;
function updatePhoneNumber(user: types.User, credential: PhoneAuthCredential): Promise<void>;
function updateProfile(user: types.User, { displayName, photoURL: photoUrl }: {
displayName?: string | null;
photoURL?: string | null;
}): Promise<void>;
function useDeviceLanguage(auth: types.FirebaseAuth): void;
function validatePassword(auth: types.FirebaseAuth, password: string): Promise<PasswordValidationStatus>;
function verifyBeforeUpdateEmail(user: types.User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
function verifyPasswordResetCode(auth: types.FirebaseAuth, code: string): Promise<string>;
}

View File

@@ -0,0 +1,24 @@
/**
* @license
* Copyright 2017 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.
*/
/**
* This is the file that people using Node.js will actually import. You should
* only include this file if you have something specific about your
* implementation that mandates having a separate entrypoint. Otherwise you can
* just use index.ts
*/
export * from './index';
import './index';

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,72 @@
/**
* @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, _FirebaseService } from '@firebase/app-compat';
import * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Provider } from '@firebase/component';
import { Observer, Unsubscribe } from '@firebase/util';
import { Wrapper } from './wrap';
export declare class Auth implements compat.FirebaseAuth, Wrapper<exp.Auth>, _FirebaseService {
readonly app: FirebaseApp;
static Persistence: {
LOCAL: string;
NONE: string;
SESSION: string;
};
readonly _delegate: exp.AuthImpl;
constructor(app: FirebaseApp, provider: Provider<'auth'>);
get emulatorConfig(): compat.EmulatorConfig | null;
get currentUser(): compat.User | null;
get languageCode(): string | null;
set languageCode(languageCode: string | null);
get settings(): compat.AuthSettings;
get tenantId(): string | null;
set tenantId(tid: string | null);
useDeviceLanguage(): void;
signOut(): Promise<void>;
useEmulator(url: string, options?: {
disableWarnings: boolean;
}): void;
applyActionCode(code: string): Promise<void>;
checkActionCode(code: string): Promise<compat.ActionCodeInfo>;
confirmPasswordReset(code: string, newPassword: string): Promise<void>;
createUserWithEmailAndPassword(email: string, password: string): Promise<compat.UserCredential>;
fetchProvidersForEmail(email: string): Promise<string[]>;
fetchSignInMethodsForEmail(email: string): Promise<string[]>;
isSignInWithEmailLink(emailLink: string): boolean;
getRedirectResult(): Promise<compat.UserCredential>;
addFrameworkForLogging(framework: string): void;
onAuthStateChanged(nextOrObserver: Observer<unknown> | ((a: compat.User | null) => unknown), errorFn?: (error: compat.Error) => unknown, completed?: Unsubscribe): Unsubscribe;
onIdTokenChanged(nextOrObserver: Observer<unknown> | ((a: compat.User | null) => unknown), errorFn?: (error: compat.Error) => unknown, completed?: Unsubscribe): Unsubscribe;
sendSignInLinkToEmail(email: string, actionCodeSettings: compat.ActionCodeSettings): Promise<void>;
sendPasswordResetEmail(email: string, actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
setPersistence(persistence: string): Promise<void>;
signInAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
signInAnonymously(): Promise<compat.UserCredential>;
signInWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
signInWithCustomToken(token: string): Promise<compat.UserCredential>;
signInWithEmailAndPassword(email: string, password: string): Promise<compat.UserCredential>;
signInWithEmailLink(email: string, emailLink?: string): Promise<compat.UserCredential>;
signInWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
signInWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
signInWithRedirect(provider: compat.AuthProvider): Promise<void>;
updateCurrentUser(user: compat.User | null): Promise<void>;
verifyPasswordResetCode(code: string): Promise<string>;
unwrap(): exp.Auth;
_delete(): Promise<void>;
private linkUnderlyingAuth;
}

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,29 @@
/**
* @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 * as exp from '@firebase/auth/internal';
export declare const Persistence: {
LOCAL: string;
NONE: string;
SESSION: string;
};
/**
* Validates that an argument is a valid persistence value. If an invalid type
* is specified, an error is thrown synchronously.
*/
export declare function _validatePersistenceArgument(auth: exp.Auth, persistence: string): void;
export declare function _savePersistenceForRedirect(auth: exp.AuthInternal): Promise<void>;
export declare function _getPersistencesFromRedirect(apiKey: string, appName: string): exp.Persistence[];

View File

@@ -0,0 +1,29 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class PhoneAuthProvider implements compat.PhoneAuthProvider, Compat<exp.PhoneAuthProvider> {
providerId: string;
readonly _delegate: exp.PhoneAuthProvider;
static PHONE_SIGN_IN_METHOD: "phone";
static PROVIDER_ID: "phone";
static credential(verificationId: string, verificationCode: string): compat.AuthCredential;
constructor();
verifyPhoneNumber(phoneInfoOptions: string | compat.PhoneSingleFactorInfoOptions | compat.PhoneMultiFactorEnrollInfoOptions | compat.PhoneMultiFactorSignInInfoOptions, applicationVerifier: compat.ApplicationVerifier): Promise<string>;
unwrap(): exp.PhoneAuthProvider;
}

View File

@@ -0,0 +1,39 @@
/**
* @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.
*/
declare global {
interface Document {
documentMode?: number;
}
}
/**
* @param {?string=} ua The user agent.
* @return {boolean} Whether the app is rendered in a mobile iOS or Android
* Cordova environment.
*/
export declare function _isAndroidOrIosCordovaScheme(ua?: string): boolean;
/** @return {boolean} Whether web storage is supported. */
export declare function _isWebStorageSupported(): boolean;
/**
* @param {?Object=} global The optional global scope.
* @return {boolean} Whether current environment is a worker.
*/
export declare function _isWorker(): boolean;
export declare function _isPopupRedirectSupported(): boolean;
/** Quick check that indicates the platform *may* be Cordova */
export declare function _isLikelyCordova(): boolean;
export declare function _isCordova(): Promise<boolean>;
export declare function _getSelfWindow(): Window | null;

View File

@@ -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 * as exp from '@firebase/auth/internal';
/** Platform-agnostic popup-redirect resolver */
export declare class CompatPopupRedirectResolver implements exp.PopupRedirectResolverInternal {
private readonly browserResolver;
private readonly cordovaResolver;
private underlyingResolver;
_redirectPersistence: exp.Persistence;
_completeRedirectFn: (auth: exp.Auth, resolver: exp.PopupRedirectResolver, bypassAuthState: boolean) => Promise<exp.UserCredential | null>;
_overrideRedirectResult: typeof exp._overrideRedirectResult;
_initialize(auth: exp.AuthImpl): Promise<exp.EventManager>;
_openPopup(auth: exp.AuthImpl, provider: exp.AuthProvider, authType: exp.AuthEventType, eventId?: string): Promise<exp.AuthPopup>;
_openRedirect(auth: exp.AuthImpl, provider: exp.AuthProvider, authType: exp.AuthEventType, eventId?: string): Promise<void>;
_isIframeWebStorageSupported(auth: exp.AuthImpl, cb: (support: boolean) => unknown): void;
_originValidation(auth: exp.Auth): Promise<void>;
get _shouldInitProactively(): boolean;
private get assertedUnderlyingResolver();
private selectUnderlyingResolver;
}

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,28 @@
/**
* @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-compat';
import * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class RecaptchaVerifier implements compat.RecaptchaVerifier, Compat<exp.ApplicationVerifier> {
readonly _delegate: exp.RecaptchaVerifier;
type: string;
constructor(container: HTMLElement | string, parameters?: object | null, app?: FirebaseApp);
clear(): void;
render(): Promise<number>;
verify(): Promise<string>;
}

View File

@@ -0,0 +1,64 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class User implements compat.User, Compat<exp.User> {
readonly _delegate: exp.User;
private static readonly USER_MAP;
readonly multiFactor: compat.MultiFactorUser;
private constructor();
static getOrCreate(user: exp.User): User;
delete(): Promise<void>;
reload(): Promise<void>;
toJSON(): object;
getIdTokenResult(forceRefresh?: boolean): Promise<compat.IdTokenResult>;
getIdToken(forceRefresh?: boolean): Promise<string>;
linkAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
linkWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
linkWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
linkWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
linkWithRedirect(provider: compat.AuthProvider): Promise<void>;
reauthenticateAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
reauthenticateWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
reauthenticateWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
reauthenticateWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
reauthenticateWithRedirect(provider: compat.AuthProvider): Promise<void>;
sendEmailVerification(actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
unlink(providerId: string): Promise<compat.User>;
updateEmail(newEmail: string): Promise<void>;
updatePassword(newPassword: string): Promise<void>;
updatePhoneNumber(phoneCredential: compat.AuthCredential): Promise<void>;
updateProfile(profile: {
displayName?: string | null;
photoURL?: string | null;
}): Promise<void>;
verifyBeforeUpdateEmail(newEmail: string, actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
get emailVerified(): boolean;
get isAnonymous(): boolean;
get metadata(): compat.UserMetadata;
get phoneNumber(): string | null;
get providerData(): Array<compat.UserInfo | null>;
get refreshToken(): string;
get tenantId(): string | null;
get displayName(): string | null;
get email(): string | null;
get photoURL(): string | null;
get providerId(): string;
get uid(): string;
private get auth();
}

View File

@@ -0,0 +1,20 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
export declare function convertCredential(auth: exp.Auth, credentialPromise: Promise<exp.UserCredential>): Promise<compat.UserCredential>;
export declare function convertConfirmationResult(auth: exp.Auth, confirmationResultPromise: Promise<exp.ConfirmationResult>): Promise<compat.ConfirmationResult>;

View File

@@ -0,0 +1,26 @@
/**
* @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.
*/
/** Forward direction wrapper from Compat --unwrap-> Exp */
export interface Wrapper<T> {
unwrap(): T;
}
/** Reverse direction wrapper from Exp --wrapped--> Compat */
export interface ReverseWrapper<T> {
wrapped(): T;
}
export declare function unwrap<T>(object: unknown): T;
export declare function wrapped<T>(object: unknown): T;

View File

@@ -0,0 +1,24 @@
/**
* @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 '@firebase/auth-compat';
import { Provider } from '@firebase/component';
import '../..';
export declare const FAKE_HEARTBEAT_CONTROLLER_PROVIDER: Provider<"heartbeat">;
export declare const FAKE_APP_CHECK_CONTROLLER_PROVIDER: Provider<"app-check-internal">;
export declare function initializeTestInstance(): void;
export declare function cleanUpTestInstance(): Promise<void>;
export declare function randomEmail(): string;

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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 '@firebase/auth-compat';

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,50 @@
/**
* @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 * as types from '@firebase/auth-types';
declare module '@firebase/component' {
interface NameServiceMapping {
'auth-compat': types.FirebaseAuth;
}
}
declare module '@firebase/app-compat' {
interface FirebaseNamespace {
auth: {
(app?: FirebaseApp): types.FirebaseAuth;
Auth: typeof types.FirebaseAuth;
EmailAuthProvider: typeof types.EmailAuthProvider;
EmailAuthProvider_Instance: typeof types.EmailAuthProvider_Instance;
FacebookAuthProvider: typeof types.FacebookAuthProvider;
FacebookAuthProvider_Instance: typeof types.FacebookAuthProvider_Instance;
GithubAuthProvider: typeof types.GithubAuthProvider;
GithubAuthProvider_Instance: typeof types.GithubAuthProvider_Instance;
GoogleAuthProvider: typeof types.GoogleAuthProvider;
GoogleAuthProvider_Instance: typeof types.GoogleAuthProvider_Instance;
OAuthProvider: typeof types.OAuthProvider;
SAMLAuthProvider: typeof types.SAMLAuthProvider;
PhoneAuthProvider: typeof types.PhoneAuthProvider;
PhoneAuthProvider_Instance: typeof types.PhoneAuthProvider_Instance;
PhoneMultiFactorGenerator: typeof types.PhoneMultiFactorGenerator;
RecaptchaVerifier: typeof types.RecaptchaVerifier;
RecaptchaVerifier_Instance: typeof types.RecaptchaVerifier_Instance;
TwitterAuthProvider: typeof types.TwitterAuthProvider;
TwitterAuthProvider_Instance: typeof types.TwitterAuthProvider_Instance;
};
}
interface FirebaseApp {
auth?(): types.FirebaseAuth;
}
}

View File

@@ -0,0 +1,24 @@
/**
* @license
* Copyright 2017 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.
*/
/**
* This is the file that people using Node.js will actually import. You should
* only include this file if you have something specific about your
* implementation that mandates having a separate entrypoint. Otherwise you can
* just use index.ts
*/
export * from './index';
import './index';

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,72 @@
/**
* @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, _FirebaseService } from '@firebase/app-compat';
import * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Provider } from '@firebase/component';
import { Observer, Unsubscribe } from '@firebase/util';
import { Wrapper } from './wrap';
export declare class Auth implements compat.FirebaseAuth, Wrapper<exp.Auth>, _FirebaseService {
readonly app: FirebaseApp;
static Persistence: {
LOCAL: string;
NONE: string;
SESSION: string;
};
readonly _delegate: exp.AuthImpl;
constructor(app: FirebaseApp, provider: Provider<'auth'>);
get emulatorConfig(): compat.EmulatorConfig | null;
get currentUser(): compat.User | null;
get languageCode(): string | null;
set languageCode(languageCode: string | null);
get settings(): compat.AuthSettings;
get tenantId(): string | null;
set tenantId(tid: string | null);
useDeviceLanguage(): void;
signOut(): Promise<void>;
useEmulator(url: string, options?: {
disableWarnings: boolean;
}): void;
applyActionCode(code: string): Promise<void>;
checkActionCode(code: string): Promise<compat.ActionCodeInfo>;
confirmPasswordReset(code: string, newPassword: string): Promise<void>;
createUserWithEmailAndPassword(email: string, password: string): Promise<compat.UserCredential>;
fetchProvidersForEmail(email: string): Promise<string[]>;
fetchSignInMethodsForEmail(email: string): Promise<string[]>;
isSignInWithEmailLink(emailLink: string): boolean;
getRedirectResult(): Promise<compat.UserCredential>;
addFrameworkForLogging(framework: string): void;
onAuthStateChanged(nextOrObserver: Observer<unknown> | ((a: compat.User | null) => unknown), errorFn?: (error: compat.Error) => unknown, completed?: Unsubscribe): Unsubscribe;
onIdTokenChanged(nextOrObserver: Observer<unknown> | ((a: compat.User | null) => unknown), errorFn?: (error: compat.Error) => unknown, completed?: Unsubscribe): Unsubscribe;
sendSignInLinkToEmail(email: string, actionCodeSettings: compat.ActionCodeSettings): Promise<void>;
sendPasswordResetEmail(email: string, actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
setPersistence(persistence: string): Promise<void>;
signInAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
signInAnonymously(): Promise<compat.UserCredential>;
signInWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
signInWithCustomToken(token: string): Promise<compat.UserCredential>;
signInWithEmailAndPassword(email: string, password: string): Promise<compat.UserCredential>;
signInWithEmailLink(email: string, emailLink?: string): Promise<compat.UserCredential>;
signInWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
signInWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
signInWithRedirect(provider: compat.AuthProvider): Promise<void>;
updateCurrentUser(user: compat.User | null): Promise<void>;
verifyPasswordResetCode(code: string): Promise<string>;
unwrap(): exp.Auth;
_delete(): Promise<void>;
private linkUnderlyingAuth;
}

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,29 @@
/**
* @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 * as exp from '@firebase/auth/internal';
export declare const Persistence: {
LOCAL: string;
NONE: string;
SESSION: string;
};
/**
* Validates that an argument is a valid persistence value. If an invalid type
* is specified, an error is thrown synchronously.
*/
export declare function _validatePersistenceArgument(auth: exp.Auth, persistence: string): void;
export declare function _savePersistenceForRedirect(auth: exp.AuthInternal): Promise<void>;
export declare function _getPersistencesFromRedirect(apiKey: string, appName: string): exp.Persistence[];

View File

@@ -0,0 +1,29 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class PhoneAuthProvider implements compat.PhoneAuthProvider, Compat<exp.PhoneAuthProvider> {
providerId: string;
readonly _delegate: exp.PhoneAuthProvider;
static PHONE_SIGN_IN_METHOD: "phone";
static PROVIDER_ID: "phone";
static credential(verificationId: string, verificationCode: string): compat.AuthCredential;
constructor();
verifyPhoneNumber(phoneInfoOptions: string | compat.PhoneSingleFactorInfoOptions | compat.PhoneMultiFactorEnrollInfoOptions | compat.PhoneMultiFactorSignInInfoOptions, applicationVerifier: compat.ApplicationVerifier): Promise<string>;
unwrap(): exp.PhoneAuthProvider;
}

View File

@@ -0,0 +1,39 @@
/**
* @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.
*/
declare global {
interface Document {
documentMode?: number;
}
}
/**
* @param {?string=} ua The user agent.
* @return {boolean} Whether the app is rendered in a mobile iOS or Android
* Cordova environment.
*/
export declare function _isAndroidOrIosCordovaScheme(ua?: string): boolean;
/** @return {boolean} Whether web storage is supported. */
export declare function _isWebStorageSupported(): boolean;
/**
* @param {?Object=} global The optional global scope.
* @return {boolean} Whether current environment is a worker.
*/
export declare function _isWorker(): boolean;
export declare function _isPopupRedirectSupported(): boolean;
/** Quick check that indicates the platform *may* be Cordova */
export declare function _isLikelyCordova(): boolean;
export declare function _isCordova(): Promise<boolean>;
export declare function _getSelfWindow(): Window | null;

View File

@@ -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 * as exp from '@firebase/auth/internal';
/** Platform-agnostic popup-redirect resolver */
export declare class CompatPopupRedirectResolver implements exp.PopupRedirectResolverInternal {
private readonly browserResolver;
private readonly cordovaResolver;
private underlyingResolver;
_redirectPersistence: exp.Persistence;
_completeRedirectFn: (auth: exp.Auth, resolver: exp.PopupRedirectResolver, bypassAuthState: boolean) => Promise<exp.UserCredential | null>;
_overrideRedirectResult: typeof exp._overrideRedirectResult;
_initialize(auth: exp.AuthImpl): Promise<exp.EventManager>;
_openPopup(auth: exp.AuthImpl, provider: exp.AuthProvider, authType: exp.AuthEventType, eventId?: string): Promise<exp.AuthPopup>;
_openRedirect(auth: exp.AuthImpl, provider: exp.AuthProvider, authType: exp.AuthEventType, eventId?: string): Promise<void>;
_isIframeWebStorageSupported(auth: exp.AuthImpl, cb: (support: boolean) => unknown): void;
_originValidation(auth: exp.Auth): Promise<void>;
get _shouldInitProactively(): boolean;
private get assertedUnderlyingResolver();
private selectUnderlyingResolver;
}

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,28 @@
/**
* @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-compat';
import * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class RecaptchaVerifier implements compat.RecaptchaVerifier, Compat<exp.ApplicationVerifier> {
readonly _delegate: exp.RecaptchaVerifier;
type: string;
constructor(container: HTMLElement | string, parameters?: object | null, app?: FirebaseApp);
clear(): void;
render(): Promise<number>;
verify(): Promise<string>;
}

View File

@@ -0,0 +1,64 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
import { Compat } from '@firebase/util';
export declare class User implements compat.User, Compat<exp.User> {
readonly _delegate: exp.User;
private static readonly USER_MAP;
readonly multiFactor: compat.MultiFactorUser;
private constructor();
static getOrCreate(user: exp.User): User;
delete(): Promise<void>;
reload(): Promise<void>;
toJSON(): object;
getIdTokenResult(forceRefresh?: boolean): Promise<compat.IdTokenResult>;
getIdToken(forceRefresh?: boolean): Promise<string>;
linkAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
linkWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
linkWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
linkWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
linkWithRedirect(provider: compat.AuthProvider): Promise<void>;
reauthenticateAndRetrieveDataWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
reauthenticateWithCredential(credential: compat.AuthCredential): Promise<compat.UserCredential>;
reauthenticateWithPhoneNumber(phoneNumber: string, applicationVerifier: compat.ApplicationVerifier): Promise<compat.ConfirmationResult>;
reauthenticateWithPopup(provider: compat.AuthProvider): Promise<compat.UserCredential>;
reauthenticateWithRedirect(provider: compat.AuthProvider): Promise<void>;
sendEmailVerification(actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
unlink(providerId: string): Promise<compat.User>;
updateEmail(newEmail: string): Promise<void>;
updatePassword(newPassword: string): Promise<void>;
updatePhoneNumber(phoneCredential: compat.AuthCredential): Promise<void>;
updateProfile(profile: {
displayName?: string | null;
photoURL?: string | null;
}): Promise<void>;
verifyBeforeUpdateEmail(newEmail: string, actionCodeSettings?: compat.ActionCodeSettings | null): Promise<void>;
get emailVerified(): boolean;
get isAnonymous(): boolean;
get metadata(): compat.UserMetadata;
get phoneNumber(): string | null;
get providerData(): Array<compat.UserInfo | null>;
get refreshToken(): string;
get tenantId(): string | null;
get displayName(): string | null;
get email(): string | null;
get photoURL(): string | null;
get providerId(): string;
get uid(): string;
private get auth();
}

View File

@@ -0,0 +1,20 @@
/**
* @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 * as exp from '@firebase/auth/internal';
import * as compat from '@firebase/auth-types';
export declare function convertCredential(auth: exp.Auth, credentialPromise: Promise<exp.UserCredential>): Promise<compat.UserCredential>;
export declare function convertConfirmationResult(auth: exp.Auth, confirmationResultPromise: Promise<exp.ConfirmationResult>): Promise<compat.ConfirmationResult>;

View File

@@ -0,0 +1,26 @@
/**
* @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.
*/
/** Forward direction wrapper from Compat --unwrap-> Exp */
export interface Wrapper<T> {
unwrap(): T;
}
/** Reverse direction wrapper from Exp --wrapped--> Compat */
export interface ReverseWrapper<T> {
wrapped(): T;
}
export declare function unwrap<T>(object: unknown): T;
export declare function wrapped<T>(object: unknown): T;

View File

@@ -0,0 +1,24 @@
/**
* @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 '@firebase/auth-compat';
import { Provider } from '@firebase/component';
import '../..';
export declare const FAKE_HEARTBEAT_CONTROLLER_PROVIDER: Provider<"heartbeat">;
export declare const FAKE_APP_CHECK_CONTROLLER_PROVIDER: Provider<"app-check-internal">;
export declare function initializeTestInstance(): void;
export declare function cleanUpTestInstance(): Promise<void>;
export declare function randomEmail(): string;

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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 '@firebase/auth-compat';

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

View File

@@ -0,0 +1,17 @@
/**
* @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.
*/
export {};

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"type":"module"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1026
node_modules/@firebase/auth-compat/dist/index.cjs.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1001
node_modules/@firebase/auth-compat/dist/index.esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1044
node_modules/@firebase/auth-compat/dist/index.node.cjs.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

86
node_modules/@firebase/auth-compat/package.json generated vendored Normal file
View File

@@ -0,0 +1,86 @@
{
"name": "@firebase/auth-compat",
"version": "0.6.3",
"description": "FirebaseAuth compatibility package that uses API style compatible with Firebase@8 and prior versions",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
"browser": "dist/index.esm.js",
"module": "dist/index.esm.js",
"exports": {
".": {
"types": "./dist/auth-compat/index.d.ts",
"node": {
"types": "./dist/auth-compat/index.node.d.ts",
"import": "./dist/esm/index.node.esm.js",
"require": "./dist/index.node.cjs.js"
},
"browser": {
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js"
},
"default": "./dist/index.esm.js"
},
"./package.json": "./package.json"
},
"files": [
"dist"
],
"scripts": {
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/auth-compat --include-dependencies build",
"build:release": "yarn build && yarn add-compat-overloads",
"dev": "rollup -c -w",
"test": "run-p --npm-path npm lint test:all",
"test:all": "run-p --npm-path npm test:browser test:node test:integration",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:browser": "karma start",
"test:browser:unit": "karma start --unit",
"test:browser:integration": "karma start --integration",
"test:node": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts",
"test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration",
"test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver",
"test:integration": "firebase emulators:exec --project demo-emulatedproject --only auth \"run-s --npm-path npm test:browser:integration test:node:integration test:webdriver\"",
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../auth/dist/auth-public.d.ts -o dist/auth-compat/index.d.ts -a -r Auth:types.FirebaseAuth -r User:types.User -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/auth"
},
"peerDependencies": {
"@firebase/app-compat": "0.x"
},
"dependencies": {
"@firebase/auth": "1.12.1",
"@firebase/auth-types": "0.13.0",
"@firebase/component": "0.7.1",
"@firebase/util": "1.14.0",
"tslib": "^2.1.0"
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.5.9",
"@rollup/plugin-json": "6.1.0",
"rollup": "2.79.2",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.36.0",
"selenium-webdriver": "4.30.0",
"typescript": "5.5.4"
},
"repository": {
"directory": "packages/auth-compat",
"type": "git",
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
},
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"typings": "dist/auth-compat/index.d.ts",
"nyc": {
"extension": [
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=20.0.0"
}
}