π 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-authenticationnpm 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
.envfile 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 startYour 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