-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #909 from KhawajaFashi/UI_change
fix: Changes to Navbar across all pages
- Loading branch information
Showing
16 changed files
with
2,244 additions
and
3,988 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Import the functions you need from the SDKs you need | ||
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-app.js"; | ||
import { getAuth, GoogleAuthProvider, signInWithPopup } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-auth.js"; | ||
// TODO: Add SDKs for Firebase products that you want to use | ||
// https://firebase.google.com/docs/web/setup#available-libraries | ||
|
||
// Your web app's Firebase configuration | ||
const firebaseConfig = { | ||
apiKey: "AIzaSyBKWr4Q0_bTP-9-dnviFlyesJITE1K9LxI", | ||
authDomain: "bobble-ai-6c878.firebaseapp.com", | ||
projectId: "bobble-ai-6c878", | ||
storageBucket: "bobble-ai-6c878.appspot.com", | ||
messagingSenderId: "389012742453", | ||
appId: "1:389012742453:web:f212dbd734d078e5b02c7c" | ||
}; | ||
|
||
// Initialize Firebase | ||
const app = initializeApp(firebaseConfig); | ||
const auth = getAuth(app); | ||
auth.languageCode = 'en'; | ||
const provider = new GoogleAuthProvider(); | ||
|
||
const google_login = document.getElementById("google_btn") | ||
google_login.addEventListener('click', () => { | ||
signInWithPopup(auth, provider) | ||
.then((result) => { | ||
// This gives you a Google Access Token. You can use it to access the Google API. | ||
const credential = GoogleAuthProvider.credentialFromResult(result); | ||
// The signed-in user info. | ||
const user = result.user; | ||
console.log(user) | ||
window.location.href = "index.html" | ||
}).catch((error) => { | ||
// Handle Errors here. | ||
const errorCode = error.code; | ||
const errorMessage = error.message; | ||
// ... | ||
}); | ||
}) |
Oops, something went wrong.