Skip to content

Commit

Permalink
Changed firebase/auth -> firebase/auth/webextension
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmesh-hemaram committed Aug 26, 2024
1 parent 24d9f8c commit 407b28b
Show file tree
Hide file tree
Showing 9 changed files with 488 additions and 16 deletions.
2 changes: 1 addition & 1 deletion apps/acf-extension/src/background/firebase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { initializeApp } from 'firebase/app';
import { getAuth, indexedDBLocalPersistence } from 'firebase/auth';
import { getAuth, indexedDBLocalPersistence } from 'firebase/auth/web-extension';
import { FIREBASE_API_KEY, FIREBASE_DATABASE_URL, FIREBASE_PROJECT_ID } from '../common/environments';

const firebase = initializeApp({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FirebaseRole } from '@dhruv-techapps/firebase-oauth';
import { FirebaseRole, User } from '@dhruv-techapps/firebase-oauth';
import { PayloadAction, createSlice } from '@reduxjs/toolkit';
import { User } from 'firebase/auth';
import { RootState } from '../../store';
import { firebaseIsLoginAPI, firebaseLoginAPI, firebaseLogoutAPI } from './firebase-login.api';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { FirebaseFunctionsBackground } from '@dhruv-techapps/firebase-functions';
import { NotificationHandler } from '@dhruv-techapps/notifications';
import { Auth } from 'firebase/auth';
import { NOTIFICATIONS_ID, NOTIFICATIONS_TITLE } from './discord-messaging.constant';
import { DiscordMessagingType } from './discord-messaging.types';

export class DiscordMessagingBackground extends FirebaseFunctionsBackground {
constructor(
auth: Auth,
auth: unknown,
edgeClientId?: string,
private VARIANT?: string
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getParameterByName, getRandomValues } from '@dhruv-techapps/core-common';
import { FirebaseFunctionsBackground } from '@dhruv-techapps/firebase-functions';
import { Auth } from '@dhruv-techapps/firebase-oauth';
import { NotificationHandler } from '@dhruv-techapps/notifications';
import { Auth } from 'firebase/auth';
import { LOCAL_STORAGE_KEY_DISCORD, NOTIFICATIONS_ID, NOTIFICATIONS_TITLE } from './discord-oauth.constant';
import { Discord } from './discord-oauth.types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { FirebaseOauth2Background } from '@dhruv-techapps/firebase-oauth';
import { Auth } from 'firebase/auth';
import { Auth, FirebaseOauth2Background } from '@dhruv-techapps/firebase-oauth';
import { Database, child, get, getDatabase, ref, remove, set } from 'firebase/database';

export class FirebaseDatabaseBackground extends FirebaseOauth2Background {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { FirebaseOauth2Background } from '@dhruv-techapps/firebase-oauth';
import { Auth, User } from 'firebase/auth';
import { Auth, FirebaseOauth2Background, User } from '@dhruv-techapps/firebase-oauth';
import { Firestore, addDoc, collection, getDoc, getDocs, getFirestore, orderBy, query, where } from 'firebase/firestore';

export class FirebaseFirestoreBackground extends FirebaseOauth2Background {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { FirebaseOauth2Background } from '@dhruv-techapps/firebase-oauth';
import { GOOGLE_SCOPES } from '@dhruv-techapps/google-oauth';
import { NotificationHandler } from '@dhruv-techapps/notifications';
import { Auth } from 'firebase/auth';
import { NOTIFICATIONS_ID, NOTIFICATIONS_TITLE } from './firebase-functions.constant';

export class FirebaseFunctionsBackground extends FirebaseOauth2Background {
cloudFunctionUrl: string;

constructor(auth: Auth, edgeClientId?: string | undefined) {
constructor(auth: unknown, edgeClientId?: string | undefined) {
super(auth, edgeClientId);
this.cloudFunctionUrl = 'https://us-central1-auto-clicker-autofill.cloudfunctions.net';
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GoogleOauth2Background } from '@dhruv-techapps/google-oauth';
import { Auth, GoogleAuthProvider, User, signInWithCredential } from 'firebase/auth';
import { FirebaseLoginResponse, FirebaseRole } from './firebase-oauth.types';
import { GoogleAuthProvider, signInWithCredential } from 'firebase/auth/web-extension';
import { Auth, FirebaseLoginResponse, FirebaseRole, User } from './firebase-oauth.types';

export class FirebaseOauth2Background extends GoogleOauth2Background {
auth;
Expand Down
Loading

0 comments on commit 407b28b

Please sign in to comment.