🚀 A secure Google authentication system built with React and Firebase Authentication.
✅ Google Sign-In & Sign-Out
✅ Firebase Authentication Integration
✅ Secure User Session Management
✅ Responsive & Clean UI
✅ Protected Routes Example
- Frontend: React.js, CSS, Bootstrap
- Authentication: Firebase Authentication
- State Management: React Hooks
- Routing: React Router
git clone https://github.com/parmarkalpesh/google-authentication.git
cd google-authentication
npm install
-
Go to the Firebase Console → Firebase
-
Create a new project
-
Enable Google Authentication
-
Get your Firebase Config Keys from Project Settings → General → Web SDK Config
-
Create a
.env
file and add the Firebase config:REACT_APP_API_KEY=your_api_key REACT_APP_AUTH_DOMAIN=your_auth_domain REACT_APP_PROJECT_ID=your_project_id REACT_APP_STORAGE_BUCKET=your_storage_bucket REACT_APP_MESSAGING_SENDER_ID=your_messaging_sender_id REACT_APP_APP_ID=your_app_id
npm start
Your app should now be running on http://localhost:3000/ 🎉
- Click the "Sign in with Google" button
- Select your Google account
- Get authenticated and see your profile details
- Click "Logout" to sign out
google-authentication/
│── src/
│ ├── components/
│ │ ├── Login.js
│ │ ├── Dashboard.js
│ │── context/
│ │ ├── AuthContext.js
│ ├── App.js
│ ├── index.js
│── public/
│── .env
│── package.json
│── README.md
- Modify the UI in
Login.js
&Dashboard.js
- Update Firebase settings in
.env
- Customize routing in
App.js
Pull requests are welcome! Feel free to submit issues or suggestions.
This project is licensed under the MIT License.
⭐ Star this repo if you found it useful!
📌 Follow me on GitHub: @parmarkalpesh