https://github.com/arsh342/firebase_login
This is a login template with firebase auth
https://github.com/arsh342/firebase_login
Last synced: 21 days ago
JSON representation
This is a login template with firebase auth
- Host: GitHub
- URL: https://github.com/arsh342/firebase_login
- Owner: arsh342
- Created: 2025-01-26T14:57:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T15:06:07.000Z (over 1 year ago)
- Last Synced: 2025-01-26T16:20:07.141Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js Login Project with Firebase Authentication
This project demonstrates a simple login and signup flow implemented using Next.js and Firebase Authentication.
## Features
- User signup and login using Firebase Authentication
- Securely manage user sessions with Next.js
- Fully responsive design
---
## Prerequisites
Before you begin, ensure you have the following:
- Node.js installed (>=16.8.0)
- Firebase account and a project created
---
## Installation Steps
1. **Clone the Repository:**
```bash
git clone https://github.com/arsh342/firebase_login.git
cd firebase_login
```
2. **Install Dependencies:**
```bash
npm install
```
3. **Set Up Firebase:**
- Go to the [Firebase Console](https://console.firebase.google.com/).
- Create a new project.
- Enable Authentication under the "Build > Authentication" section.
- Set up the desired sign-in methods (e.g., Email/Password).
- Copy your Firebase config object from "Project Settings > General > Your apps".
4. **Add Environment Variables:**
- Create a `.env.local` file in the root of the project.
- Add the following variables:
```env
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
```
5. **Run the Application:**
```bash
npm run dev
```
The app will be available at `http://localhost:3000`.
---
## Project Structure
```
.
├── components # Reusable React components
├── pages # Next.js pages (e.g., login, signup, dashboard)
├── styles # Global and component-specific styles
├── firebase # Firebase config and initialization
└── public # Static assets
```
---
## Commands
- `npm run dev`: Start the development server.
- `npm run build`: Build the project for production.
- `npm start`: Start the production server.
---
## Notes
- Ensure all environment variables are added to `.env.local`.
- Do not commit your `.env.local` file to version control for security purposes.
---
## Support
If you encounter any issues, feel free to create an issue in the repository or reach out to the maintainers.
---
Happy coding!