2
2
import { initializeApp } from "firebase/app" ;
3
3
import { getAnalytics } from "firebase/analytics" ;
4
4
import {
5
- getAuth ,
6
- GoogleAuthProvider ,
7
- signInWithPopup ,
8
- signInWithEmailAndPassword ,
9
- createUserWithEmailAndPassword ,
10
- sendPasswordResetEmail ,
11
- updatePassword ,
12
- linkWithPopup
13
- } from 'firebase/auth' ;
5
+ getAuth ,
6
+ GoogleAuthProvider ,
7
+ signInWithPopup ,
8
+ signInWithEmailAndPassword as firebaseSignInWithEmailAndPassword ,
9
+ createUserWithEmailAndPassword ,
10
+ sendPasswordResetEmail ,
11
+ updatePassword ,
12
+ linkWithPopup
13
+ }
14
+ from 'firebase/auth' ;
14
15
15
- import { getAuth , GoogleAuthProvider , signInWithPopup , signInWithEmailAndPassword , createUserWithEmailAndPassword , sendPasswordResetEmail , updatePassword , linkWithPopup } from 'firebase/auth' ;
16
16
import { getFirestore , doc , setDoc , getDoc } from 'firebase/firestore' ;
17
17
18
18
@@ -22,6 +22,15 @@ import { getFirestore, doc, setDoc, getDoc } from 'firebase/firestore';
22
22
// Your web app's Firebase configuration
23
23
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
24
24
25
+ console . log ( import . meta. env . VITE_FIREBASE_API_KEY ) ;
26
+ console . log ( import . meta. env . VITE_FIREBASE_AUTH_DOMAIN ) ;
27
+ console . log ( import . meta. env . VITE_FIREBASE_PROJECT_ID ) ;
28
+ console . log ( import . meta. env . VITE_FIREBASE_STORAGE_BUCKET ) ;
29
+ console . log ( import . meta. env . VITE_FIREBASE_MESSAGING_SENDER_ID ) ;
30
+ console . log ( import . meta. env . VITE_FIREBASE_APP_ID ) ;
31
+
32
+ // change to env.local?
33
+
25
34
const firebaseConfig = {
26
35
apiKey : import . meta. env . VITE_FIREBASE_API_KEY ,
27
36
authDomain : import . meta. env . VITE_FIREBASE_AUTH_DOMAIN ,
@@ -55,9 +64,9 @@ const registerWithEmail = async (email, password) => {
55
64
} ;
56
65
57
66
const signInWithEmailAndPassword = async ( email , password ) => {
58
- await signInWithEmailAndPassword ( auth , email , password ) ;
67
+ await firebaseSignInWithEmailAndPassword ( auth , email , password ) ;
59
68
} ;
60
-
69
+
61
70
const sendPasswordReset = async ( email ) => {
62
71
await sendPasswordResetEmail ( auth , email ) ;
63
72
} ;
0 commit comments