NextJS Firebase Auth Tutorial • How to Authenticate Users for Your App

  Рет қаралды 24,976

pixegami

pixegami

Күн бұрын

Learn how to add user authentication to your project by using Firebase Authentication!
In this project I add Firebase Authentication to a NextJS serverless app, which interacts with a custom FastAPI Python backend.
Authentication is challenge, and there are many decisions to make. In this video, you'll learn one of the cheapest fastest ways to do it (for any project) and discover how it works behind the scenes.
🛠 Essential Links
🔗 Code: github.com/pixegami/nextjs-fi...
🔗 NextJS Shop Template: github.com/pixegami/nextjs-sh...
🔗 Python Backend: github.com/pixegami/jwt-echo
📚 Resources
🔗 Firebase: firebase.google.com
🔗 NVM: github.com/nvm-sh/nvm
🔗 NextJS: nextjs.org
🔗 JWT: jwt.io
💡 Learn More! (Related tutorials)
🔗 Build NextJS landing page: • NextJS and TailwindCSS...
🔗 Host FastAPI on AWS Lambda: • Deploy FastAPI on AWS ...
📽 Chapters
00:00 Introduction
00:54 Project preview
01:42 Prerequisites
03:34 Exploring the project
04:08 Setting up Firebase
06:48 Adding user authentication
08:13 Signing In
09:21 Redirecting users automatically
11:04 Signing Out
12:22 How does our backend authorize users?
13:22 What are JSON Web Tokens (JWT)?
14:38 How are JWT verified?
15:58 Attaching JWT to a HTTP request
17:02 Verifying the token from the backend
20:19 Wrapping up
#firebase #auth #pixegami

Пікірлер: 50
@SrijitGhosh1605
@SrijitGhosh1605 Жыл бұрын
loved your tutorial. This was the 3rd video I saw on the topic and the last one I'll need. Keep up the great work.
@pixegami
@pixegami Жыл бұрын
Glad it helped!
@karimsensei
@karimsensei Жыл бұрын
at last someone who explained it perfect! everything is working fine, many thanks !
@pixegami
@pixegami Жыл бұрын
Glad to hear that!
@Felipera_
@Felipera_ Жыл бұрын
10x better than any docs google ever put out.
@pixegami
@pixegami Жыл бұрын
Thanks! I also find some documentation a bit dry, so I make tutorials the way *I'd* like to learn for myself.
@Felipera_
@Felipera_ Жыл бұрын
@@pixegami they make a tool like firebase where you can get setup in 10 minutes but to get there you need to read the docs for 3 hours lmao
@lol-hz9mc
@lol-hz9mc Жыл бұрын
Thank you sir, It helped a lot!!
@rickships1333
@rickships1333 Жыл бұрын
dude you are awesome, thx for the good content! pls keep it up
@pixegami
@pixegami Жыл бұрын
I appreciate it!
@PauloHenriqueConeglian
@PauloHenriqueConeglian Жыл бұрын
Very nice and straight to the point tutorial! Just want to point that if you try to refresh the dashboard page after logged in, you are going to get an error. The easy fix, at least the one that worked for me, was to import the FirebaseApp component and then initFirebase() inside de dashboard component. Great work!
@pixegami
@pixegami Жыл бұрын
Thanks for that tip!
@kousheralam
@kousheralam Жыл бұрын
Your video is qualityful and you are a good teacher. ❤❤
@pixegami
@pixegami Жыл бұрын
Thanks!
@user-xv9bn2fe5c
@user-xv9bn2fe5c 11 ай бұрын
Man u saved my life! I was very stressed implementing authentication😑😑. Thanks a lot!
@pixegami
@pixegami 10 ай бұрын
Glad it helped!
@mestalion8735
@mestalion8735 Жыл бұрын
Amazing, thank you!
@pixegami
@pixegami Жыл бұрын
Glad you liked it!
@devkunjadia3792
@devkunjadia3792 Жыл бұрын
love this tutorial
@skverskk
@skverskk Жыл бұрын
Nice tutorial, especially discussing the TokenId verification flow. Would you consider doing a Firebase Auth with Email/Password as a provider? Thanks
@pixegami
@pixegami Жыл бұрын
You're welcome! I don't have plans to do email/password tutorial videos at the moment - although it could be an interesting idea. What would make you choose to do your own email/password over integrating with a third party OAuth? I get the use case for bigger projects or companies, but for small projects and prototyping, I'm not sure if it's worth the extra work.
@skverskk
@skverskk Жыл бұрын
@@pixegami There’s so little Firebase Admin SDK out there. Interested in Firebase Token management on the Server with protecting routes, etc.
@stamend28
@stamend28 Жыл бұрын
Yeah, that's cool to use Google authentication than the one which requires an email and a password. At least for the user. This one's helped me.
@pixegami
@pixegami Жыл бұрын
Yeah, I think it's fine for most customers to use Google login. Signing in with a custom email for a small site is usually a hassle anyway. And it's easier for us as developers not having to maintain a user database.
@stamend28
@stamend28 Жыл бұрын
@@pixegami Good for both then
@spacecoder0526
@spacecoder0526 Жыл бұрын
Can you make a tutorial for Next JS with next auth+Prisma+Postgresql + Stripe? I really want to learn about it.
@ron-almog
@ron-almog Жыл бұрын
Hey, are you using copilot? or some other "assistant"? those predictions are exactly what you're going to type 2 sec later. very cool.
@pixegami
@pixegami 10 ай бұрын
Yup! I'm using GitHub Copilot.
@juanchogonzalez11
@juanchogonzalez11 Жыл бұрын
Thank you.
@pixegami
@pixegami Жыл бұрын
You're welcome!
@nizarhaidar5225
@nizarhaidar5225 8 ай бұрын
hi love. your content. how does your shell look so good? is it the default version?
@pixegami
@pixegami 8 ай бұрын
Thanks! I have some themes for the terminal. For MacOS (which is the one I'm using now), here's the video: kzbin.info/www/bejne/q5jannuVrd-eeaM Here's an older one for Ubuntu: kzbin.info/www/bejne/i6e8ZpR8fbOie9k
@roccccat
@roccccat Жыл бұрын
I've seen your Tutorial to generative art recently and wanted to ask if It would be ok to use your Code to make NFT's and sell them.
@pixegami
@pixegami Жыл бұрын
Go ahead!
@ahmedhussein8177
@ahmedhussein8177 Жыл бұрын
Awesome tutorial, could you please share your zsh setup, thanks :)
@pixegami
@pixegami Жыл бұрын
Yup! I actually have video/code about it here: kzbin.info/www/bejne/i6e8ZpR8fbOie9k
@kousheralam
@kousheralam Жыл бұрын
Bhai, could you please taught us how to implement the backend script on expressjs. and describe the process of it ?
@pixegami
@pixegami Жыл бұрын
I don't have a lot of experience with ExpressJs yet so a video on that isn't in my radar at the moment.
@satyamsrivastava1301
@satyamsrivastava1301 Жыл бұрын
lovely tutorial, also can you give the themes, font and icon packs you used in vs code.
@pixegami
@pixegami Жыл бұрын
Thank you! The theme I used is "Monokai Pro". I don't think I'm using any icon packs though... Or maybe I installed them a long time ago and forgot.
@satyamsrivastava1301
@satyamsrivastava1301 Жыл бұрын
Thanks again ❤️
@viniciuspollo3832
@viniciuspollo3832 Жыл бұрын
good video , add Next-auth, services, process.env, deploy vercel, sessionProvider ,
@pixegami
@pixegami Жыл бұрын
Yup, there's a lot of ground to cover with Auth!
@BuzzFashUpdate
@BuzzFashUpdate 10 ай бұрын
How do I use it with Nextjs middleware in the app dir.
@pixegami
@pixegami 10 ай бұрын
I'm not sure, I didn't get that far - but since Firebase is so widely used with NextJS I'm sure it's possible. I asked ChatGPT and it came up with some examples, but I didn't try it myself.
@kousheralam
@kousheralam Жыл бұрын
1000 like
@Phuni.
@Phuni. Жыл бұрын
Your github project see,s to be the wrong one
@pixegami
@pixegami Жыл бұрын
Thanks for pointing it out! I forgot to push my changes. Here's the updated repo: github.com/pixegami/nextjs-firebase-auth
@karthikm.1804
@karthikm.1804 Жыл бұрын
2048 game with python
@pixegami
@pixegami Жыл бұрын
Good idea :) I'll write it down.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
Next.js Authentication Firebase - Sign in with Google
36:54
Code Commerce
Рет қаралды 36 М.
MOM TURNED THE NOODLES PINK😱
00:31
JULI_PROETO
Рет қаралды 17 МЛН
The Ultimate Guide to Next Auth - Everything You Need
1:36:26
Brett Westwood - Software Engineer
Рет қаралды 56 М.
Subtle, yet Beautiful Scroll Animations
5:04
Beyond Fireship
Рет қаралды 1,6 МЛН
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 237 М.
React Authentication Crash Course With Firebase And Routing
56:00
Web Dev Simplified
Рет қаралды 645 М.
Next js Tutorial for Beginners | Nextjs 13 (App Router) with TypeScript
1:02:55
Programming with Mosh
Рет қаралды 513 М.
Designing scalable Compose APIs
19:53
Android Developers
Рет қаралды 10 М.