diff --git a/firebase.json b/firebase.json index 7276b30..d52034f 100644 --- a/firebase.json +++ b/firebase.json @@ -26,6 +26,9 @@ "ui": { "enabled": true }, - "singleProjectMode": true + "singleProjectMode": true, + "firestore": { + "port": 8080 + } } } diff --git a/saved-data/auth_export/accounts.json b/saved-data/auth_export/accounts.json index 3071af4..713625a 100644 --- a/saved-data/auth_export/accounts.json +++ b/saved-data/auth_export/accounts.json @@ -1 +1 @@ -{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"2nrlZe6RlIf3kKLaxVUOiHAOBqTm","createdAt":"1732310835799","lastLoginAt":"1732310835799","displayName":"Bob Joe ","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltwrmSCs55aYph22PIBFpS:password=bobjoe","salt":"fakeSaltwrmSCs55aYph22PIBFpS","passwordUpdatedAt":1732310948695,"providerUserInfo":[{"providerId":"password","email":"bobjoe@gmail.com","federatedId":"bobjoe@gmail.com","rawId":"bobjoe@gmail.com","displayName":"Bob Joe ","photoUrl":""}],"validSince":"1732310948","email":"bobjoe@gmail.com","emailVerified":false,"disabled":false}]} \ No newline at end of file +{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"2nrlZe6RlIf3kKLaxVUOiHAOBqTm","createdAt":"1732310835799","lastLoginAt":"1732310835799","displayName":"Bob Joe ","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltQ4BqqcgSy9Nr2urvaB04:password=bobjoe","salt":"fakeSaltQ4BqqcgSy9Nr2urvaB04","passwordUpdatedAt":1732311933870,"providerUserInfo":[{"providerId":"password","email":"bobjoe@gmail.com","federatedId":"bobjoe@gmail.com","rawId":"bobjoe@gmail.com","displayName":"Bob Joe ","photoUrl":""}],"validSince":"1732311933","email":"bobjoe@gmail.com","emailVerified":true,"disabled":false,"customAttributes":"","lastRefreshAt":"2024-11-22T21:45:33.870Z"}]} \ No newline at end of file diff --git a/saved-data/database_export/wildquarters-nu.json b/saved-data/database_export/wildquarters-nu.json index 4fcbdb5..1e12b7b 100644 --- a/saved-data/database_export/wildquarters-nu.json +++ b/saved-data/database_export/wildquarters-nu.json @@ -1 +1 @@ -{"roommateInfo":{"Anya Bardach":{"bedTime":"Late","clean":"Clean","desc":"ladeedah","fullName":"Anya Bardach","gender":"Female","guests":"Yes","location":"South","major":"Computer Science","noise":"Fine with noises","number":"34201922854","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2FAnya%20Bardach?alt=media&token=59c8b7a4-668f-4fc7-99e1-42dd5ad9aad2","roommateGender":["Female","Non-binary","Male","Any"],"size":["Double","Suite"],"wakeUpTime":"8-10 AM"},"Chris Riesbeck":{"bedTime":"Early","clean":"Clean","desc":"I'm an agile type of guy","fullName":"Chris Riesbeck","gender":"Male","guests":"No","location":"North","major":"Computer Science","noise":"Quiet","number":"1234567890","profilePhoto":"","roommateGender":["Any"],"size":["Double","Triple","Suite"],"wakeUpTime":"6-8 AM"},"Finn Hagerty":{"bedTime":"Early","clean":"Clean","desc":"Looking for a roommate","fullName":"Finn Hagerty","gender":"Male","guests":"Yes","location":"North","major":"MechE","noise":"Quiet","number":"2349313902","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2FFinn%20Hagerty?alt=media&token=59d76f6b-a367-4626-9434-dfebea672fb2","roommateGender":["Any","Female","Male","Non-binary"],"size":["Double","Triple"],"wakeUpTime":"6-8 AM"},"Levy Deckard":{"bedTime":"Early","clean":"Clean","desc":"Hehehe clickin buttons","fullName":"Levy Deckard","gender":"Male","guests":"Yes","location":"North","major":"Computer Whatever","noise":"Occasional","number":"1234567890","profilePhoto":"https://img.freepik.com/free-photo/portrait-man-laughing_23-2148859448.jpg?size=338&ext=jpg&ga=GA1.1.2113030492.1728950400&semt=ais_hybrid","roommateGender":["Male"],"size":["Double"],"wakeUpTime":"8-10 AM"},"Patrick Jiang":{"bedTime":"Late","clean":"Messy","desc":"A really fun and chill laidback dude","fullName":"Patrick Jiang","gender":"Male","guests":"Yes","location":"South","major":"Computer Science","noise":"Occasional","number":"4252474099","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2FPatrick%20Jiang?alt=media&token=8fc70962-99bd-457d-afca-6d6731a6af6f","roommateGender":["Any"],"size":["Double","Triple","Suite"],"wakeUpTime":"10AM-12PM"},"Seeley McGillis":{"bedTime":"Early","clean":"Clean","desc":"lalalalalal ocean lalalalala pumpkin","fullName":"Seeley McGillis","gender":"Female","guests":"Yes","location":"North","major":"Environmental Engineer","noise":"Occasional","number":"9178373064","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2FSeeley%20McGillis?alt=media&token=b84966a3-0a85-4f95-ad5d-29a515e36a62","roommateGender":["Female","Non-binary"],"size":["Double","Suite"],"wakeUpTime":"8-10 AM"},"sdfjskadfdsaf ":{"bedTime":"Late","clean":"Clean","desc":"asfhjdsafjkldsfhjksdahfksdaf","fullName":"sdfjskadfdsaf ","gender":"Female","guests":"Yes","location":"North","major":"df djsakf hsdajkf sdaf ","noise":"Quiet","number":"324287468453","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2Fsdfjskadfdsaf%20?alt=media&token=178e7731-92c6-4b46-b963-fa25b73bcfac","roommateGender":["Female"],"size":["Suite"],"wakeUpTime":"8-10 AM"}}} \ No newline at end of file +{"roommateInfo":{"Anya Bardach":{"bedTime":"Late","clean":"Clean","desc":"ladeedah","fullName":"Anya Bardach","gender":"Female","guests":"Yes","location":"South","major":"Computer Science","noise":"Fine with noises","number":"34201922854","profilePhoto":"https://firebasestorage.googleapis.com/v0/b/wildquarters-nu.appspot.com/o/profilePhotos%2FAnya%20Bardach?alt=media&token=59c8b7a4-668f-4fc7-99e1-42dd5ad9aad2","roommateGender":["Female","Non-binary","Male","Any"],"size":["Double","Suite"],"wakeUpTime":"8-10 AM"},"Chris Riesbeck":{"bedTime":"Early","clean":"Clean","desc":"I'm an agile type of guy","fullName":"Chris Riesbeck","gender":"Male","guests":"No","location":"North","major":"Computer Science","noise":"Quiet","number":"1234567890","profilePhoto":"","roommateGender":["Any"],"size":["Double","Triple","Suite"],"wakeUpTime":"6-8 AM"}}} \ No newline at end of file diff --git a/saved-data/firebase-export-metadata.json b/saved-data/firebase-export-metadata.json index f9215af..0f615e5 100644 --- a/saved-data/firebase-export-metadata.json +++ b/saved-data/firebase-export-metadata.json @@ -1,5 +1,10 @@ { "version": "13.22.0", + "firestore": { + "version": "1.19.8", + "path": "firestore_export", + "metadata_file": "firestore_export/firestore_export.overall_export_metadata" + }, "database": { "version": "4.11.2", "path": "database_export" diff --git a/saved-data/firestore_export/firestore_export.overall_export_metadata b/saved-data/firestore_export/firestore_export.overall_export_metadata new file mode 100644 index 0000000..92b92aa Binary files /dev/null and b/saved-data/firestore_export/firestore_export.overall_export_metadata differ diff --git a/src/utilities/firebase.js b/src/utilities/firebase.js index d365f9b..4e9253e 100644 --- a/src/utilities/firebase.js +++ b/src/utilities/firebase.js @@ -26,6 +26,18 @@ const database = getDatabase(firebase); const storage = getStorage(firebase); const auth = getAuth(firebase); // AUTH STUFF +if (!globalThis.EMULATION && import.meta.env.MODE === 'development') { + connectAuthEmulator(auth, "http://127.0.0.1:9099"); + connectDatabaseEmulator(database, "127.0.0.1", 9000); + + signInWithCredential(auth, GoogleAuthProvider.credential( + '{"sub": "2nrlZe6RlIf3kKLaxVUOiHAOBqTm", "email": "bobjoe@gmail.com", "displayName":"Bob Joe", "email_verified": true}' + )); + + // set flag to avoid connecting twice, e.g., because of an editor hot-reload + globalThis.EMULATION = true; +} + export const signInWithGoogle = async (navigate) => { const provider = new GoogleAuthProvider();