Learn how to implement Google Firebase Authentication in your React, Next.js, TypeScript projects.
https://firebase-auth-with-nextjs.netlify.app/
- Authentication with Google Firebase v9
- Form validation with Tailwind CSS
- React context API
- Custom Hooks
- Clean UI
- Protected routes
- Next.js v13
- TypeScript v4.9
- Tailwind CSS v3
- Forms designed for both light and dark modes
- Framer motion transitions
To Contribute to this project, please read the Contribution Guidlines
-
Create a Firebase project here
-
Make sure the
.env
file is added to the.gitignore
file -
Rename the
.env.example
to.env
or.env.local
-
Add your Firebase project configurations to the
.env
file. I have already prepared the the environment variables for you. -
If you're not familiar with setting up a Firebase project, read this article I wrote for this project available on my website where I have explained every step with screenshots.
- Make sure you have Node JS installed. If you don't have it:
- Download it from nodejs.org
- Install it using NVM
- If you're on Mac, Homebrew is a good option too:
brew install node
- Clone the repo:
git clone https://github.com/realstoman/nextjs-firebase-auth.git
- Open the project folder:
cd nextjs-firebase-auth
- Install packages and dependencies:
npm install
- Start a local dev server at
http://localhost:3000
:
npm run dev
- Always run
npm install
after pulling new changes. - Feel free to use the code in your projects.
- I'll be constantly updating this repo as I'll be adding more sections to it, so please always check the projects section of this repo to see what tasks are under todo or in progress.
- Coming Soon I'll be doing a screencast. Soon I'll be uploading a video to my YouTube channel where I'll be going through the process of creating this project.
- Contributions are welcome.