diff --git a/public/createuser.js b/public/createuser.js index eb0fd75..af552b7 100644 --- a/public/createuser.js +++ b/public/createuser.js @@ -1,3 +1,25 @@ +import { initializeApp } from "https://www.gstatic.com/firebasejs/9.1.1/firebase-app.js"; +import { getFirestore } from "https://www.gstatic.com/firebasejs/9.1.1/firebase-firestore.js" +import { collection, doc, getDoc, getDocs, addDoc, setDoc, Timestamp, serverTimestamp } from "https://www.gstatic.com/firebasejs/9.1.1/firebase-firestore.js" +import { query, orderBy, limit, where, onSnapshot } from "https://www.gstatic.com/firebasejs/9.1.1/firebase-firestore.js" +import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, onAuthStateChanged } from "https://www.gstatic.com/firebasejs/9.1.1/firebase-auth.js" + +const firebaseConfig = { + apiKey: "AIzaSyDA5itOehOkeLc9ob3a8GsTJ9VhbWdee7I", + authDomain: "sprout-financials.firebaseapp.com", + databaseURL: "https://sprout-financials-default-rtdb.firebaseio.com", + projectId: "sprout-financials", + storageBucket: "sprout-financials.appspot.com", + messagingSenderId: "864423850272", + appId: "1:864423850272:web:725227e1ed9a578ef36745", + measurementId: "G-Z0E9H5Z16M" +}; +const app = initializeApp(firebaseConfig); +const db = getFirestore(app); +const newUserRequest = collection(db, 'new_user_requests'); +const users = collection(db, 'users'); +const auth = getAuth(); + console.log("createuser.js loaded!!") /*Passwords must be: --> a minimum of 8 characters,