Skip to content

Commit

Permalink
Merge pull request #16 from the-collab-lab/config
Browse files Browse the repository at this point in the history
add firebase credentials and update deprecated code
  • Loading branch information
tannaurus authored Aug 11, 2024
2 parents b55f404 + 7af9b70 commit 5b35105
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/api/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { getAuth } from 'firebase/auth';

// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: 'FILL_ME_IN',
authDomain: 'FILL_ME_IN',
projectId: 'FILL_ME_IN',
storageBucket: 'FILL_ME_IN',
messagingSenderId: 'FILL_ME_IN',
appId: 'FILL_ME_IN',
};
apiKey: "AIzaSyCNcvVYUKCY13rkYYJ70zkIAQYs-M8E_AQ",
authDomain: "tcl-77-smart-shopping-list.firebaseapp.com",
projectId: "tcl-77-smart-shopping-list",
storageBucket: "tcl-77-smart-shopping-list.appspot.com",
messagingSenderId: "35210747522",
appId: "1:35210747522:web:e39f63e23150653f0f1e9b"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
Expand Down
4 changes: 2 additions & 2 deletions src/api/useAuth.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { auth } from './config.js';
import { GoogleAuthProvider, signInWithRedirect } from 'firebase/auth';
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
import { addUserToDatabase } from './firebase.js';

/**
Expand All @@ -11,7 +11,7 @@ import { addUserToDatabase } from './firebase.js';
export const SignInButton = () => (
<button
type="button"
onClick={() => signInWithRedirect(auth, new GoogleAuthProvider())}
onClick={() => signInWithPopup(auth, new GoogleAuthProvider())}
>
Sign In
</button>
Expand Down

0 comments on commit 5b35105

Please sign in to comment.