Skip to content

Commit aeb9241

Browse files
committed
2 parents ebb0835 + 5b35105 commit aeb9241

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/api/config.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { getAuth } from 'firebase/auth';
44

55
// Your web app's Firebase configuration
66
const firebaseConfig = {
7-
apiKey: 'FILL_ME_IN',
8-
authDomain: 'FILL_ME_IN',
9-
projectId: 'FILL_ME_IN',
10-
storageBucket: 'FILL_ME_IN',
11-
messagingSenderId: 'FILL_ME_IN',
12-
appId: 'FILL_ME_IN',
13-
};
7+
apiKey: "AIzaSyCNcvVYUKCY13rkYYJ70zkIAQYs-M8E_AQ",
8+
authDomain: "tcl-77-smart-shopping-list.firebaseapp.com",
9+
projectId: "tcl-77-smart-shopping-list",
10+
storageBucket: "tcl-77-smart-shopping-list.appspot.com",
11+
messagingSenderId: "35210747522",
12+
appId: "1:35210747522:web:e39f63e23150653f0f1e9b"
13+
};
1414

1515
// Initialize Firebase
1616
const app = initializeApp(firebaseConfig);

src/api/useAuth.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from 'react';
22
import { auth } from './config.js';
3-
import { GoogleAuthProvider, signInWithRedirect } from 'firebase/auth';
3+
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
44
import { addUserToDatabase } from './firebase.js';
55

66
/**
@@ -11,7 +11,7 @@ import { addUserToDatabase } from './firebase.js';
1111
export const SignInButton = () => (
1212
<button
1313
type="button"
14-
onClick={() => signInWithRedirect(auth, new GoogleAuthProvider())}
14+
onClick={() => signInWithPopup(auth, new GoogleAuthProvider())}
1515
>
1616
Sign In
1717
</button>

0 commit comments

Comments
 (0)