From 17979b1aeb98763410dfb6d7a15c1411df2232aa Mon Sep 17 00:00:00 2001 From: Himanshu Kumar <97390553+agarwalhimanshugaya@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:32:48 +0000 Subject: [PATCH 1/4] change learn.md --- LEARN.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/LEARN.md b/LEARN.md index 544c97a5..1e56200e 100644 --- a/LEARN.md +++ b/LEARN.md @@ -6,6 +6,24 @@ UniCollab is not just a platform; it's a community-driven ecosystem that empower ## Getting Started +### With docker +- For run the App write the following command +```bash +docker build -t your-image-name . +docker push your-image-name + +``` +- For Deploy the App Locally with kubernetes + +1. Add the image name in deployment.yaml + +2. write the following command to run the app +```bash + +kubectl apply -f deployment.yaml +kubectl apply -f service.yaml + +``` ### 1. Clone the Repository First, clone the UniCollab repository to your local machine: From 6f98b9ec5d27d6c2936e69b91afc56b72b455801 Mon Sep 17 00:00:00 2001 From: Ojas Arora <127867874+Ojas-Arora@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:06:39 +0530 Subject: [PATCH 2/4] Adding Twitter Authentication --- src/Components/Firebase/Firebase.js | 27 +++++++++++++++++++++++++-- src/Components/Login.js | 25 +++++++++++++++++++------ 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/Components/Firebase/Firebase.js b/src/Components/Firebase/Firebase.js index 4b4a51fc..5b0e97ec 100644 --- a/src/Components/Firebase/Firebase.js +++ b/src/Components/Firebase/Firebase.js @@ -2,7 +2,16 @@ import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; import { getFirestore } from "firebase/firestore"; -import { getAuth, GoogleAuthProvider, GithubAuthProvider, FacebookAuthProvider, signInWithPopup, RecaptchaVerifier, signInWithPhoneNumber } from "firebase/auth"; +import { + getAuth, + GoogleAuthProvider, + GithubAuthProvider, + FacebookAuthProvider, + TwitterAuthProvider, // Import TwitterAuthProvider + signInWithPopup, + RecaptchaVerifier, + signInWithPhoneNumber +} from "firebase/auth"; // Your web app's Firebase configuration const firebaseConfig = { @@ -22,8 +31,22 @@ const db = getFirestore(firebaseApp); const googleProvider = new GoogleAuthProvider(); const githubProvider = new GithubAuthProvider(); const facebookProvider = new FacebookAuthProvider(); +const twitterProvider = new TwitterAuthProvider(); // Initialize TwitterAuthProvider const auth = getAuth(firebaseApp); -export { auth, signInWithPopup, githubProvider, googleProvider, facebookProvider, GithubAuthProvider, FacebookAuthProvider, RecaptchaVerifier, signInWithPhoneNumber }; +export { + auth, + signInWithPopup, + githubProvider, + googleProvider, + facebookProvider, + twitterProvider, // Export twitterProvider + GithubAuthProvider, + FacebookAuthProvider, + TwitterAuthProvider, // Export TwitterAuthProvider + RecaptchaVerifier, + signInWithPhoneNumber +}; + export { db, analytics, firebaseApp as app }; export default firebaseApp; diff --git a/src/Components/Login.js b/src/Components/Login.js index eca6a885..dd693de1 100644 --- a/src/Components/Login.js +++ b/src/Components/Login.js @@ -12,6 +12,7 @@ import { createUserWithEmailAndPassword, RecaptchaVerifier, signInWithPhoneNumber, + TwitterAuthProvider } from 'firebase/auth'; const LogIn = () => { @@ -60,6 +61,18 @@ const LogIn = () => { console.error('Facebook sign-in error:', error); } }; + const handleTwitterSignIn = async () => { + try { + const twitterProvider = new TwitterAuthProvider(); + const result = await signInWithPopup(auth, twitterProvider); + const user = result.user; + localStorage.setItem('user', JSON.stringify(user)); + console.log('Twitter sign-in success:', user); + navigate('/'); + } catch (error) { + console.error('Twitter sign-in error:', error); + } + }; const handleLogin = async (e) => { e.preventDefault(); @@ -257,9 +270,9 @@ const LogIn = () => {
- - - +
+ +
@@ -355,9 +368,9 @@ const LogIn = () => {
- - - +
+ +
From 197512a5bba047349ab1b398000af0db89a170c3 Mon Sep 17 00:00:00 2001 From: Meet Jain <133582566+Meetjain1@users.noreply.github.com> Date: Thu, 25 Jul 2024 20:11:34 +0530 Subject: [PATCH 3/4] Update Footer.js --- src/Components/Footer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Components/Footer.js b/src/Components/Footer.js index 4436d833..af1e3a39 100644 --- a/src/Components/Footer.js +++ b/src/Components/Footer.js @@ -11,6 +11,8 @@ const scrollToTop = () => { }; const Footer = () => { + const today = new Date(); + const year = today.getFullYear(); return (
@@ -72,7 +74,7 @@ const Footer = () => {
- © 2024 UniCollab. All rights reserved. + © {year} UniCollab. All rights reserved.
@@ -80,4 +82,4 @@ const Footer = () => { ); } -export default Footer; \ No newline at end of file +export default Footer; From 0ae2e610adba8ecee8db4adc7ce8d2239d4dd2fd Mon Sep 17 00:00:00 2001 From: Ojas Arora <127867874+Ojas-Arora@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:48:44 +0530 Subject: [PATCH 4/4] Adding Microsoft Authentication --- src/Components/Firebase/Firebase.js | 2 +- src/Components/Login.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Components/Firebase/Firebase.js b/src/Components/Firebase/Firebase.js index 2998b207..2aed5bfb 100644 --- a/src/Components/Firebase/Firebase.js +++ b/src/Components/Firebase/Firebase.js @@ -52,4 +52,4 @@ export { }; export { db, analytics, firebaseApp as app }; -export default firebaseApp; +export default firebaseApp; \ No newline at end of file diff --git a/src/Components/Login.js b/src/Components/Login.js index 6adc39a8..f704306d 100644 --- a/src/Components/Login.js +++ b/src/Components/Login.js @@ -12,8 +12,7 @@ import { createUserWithEmailAndPassword, RecaptchaVerifier, signInWithPhoneNumber, - TwitterAuthProvider - TwitterAuthProvider + TwitterAuthProvider, } from 'firebase/auth'; const LogIn = () => {