Hey Everyone! Important note for those starting out a new Firebase project below. This video is using the v8 version of Firebase. Google has recently released a v9 version of Firebase that is more modular and optimized. You can still follow along this tutorial, a lot of it is still relevant. However some of the code snippets you'll find will be slightly different/outdated, with the new v9 version of Firebase.
@hirosyee3 жыл бұрын
What are changes you already know ??
@yellowbonbon13 жыл бұрын
@@hirosyee same question
@JohnBuildWebsites3 жыл бұрын
FirebaseUI is incompatible with v9 version of firebase
@JohnBuildWebsites3 жыл бұрын
@Bagshot Thanks - I had similar issues trying to follow this tutorial so thought best to share. Glad it was worth the time.
@RawFatGod2 жыл бұрын
Thanks for letting us know.
@outis993 жыл бұрын
Honestly mate this is so good, a fast and concise video I can revisit whenever I want to start a new Next/Firebase project. Personally I love this fast informative videos like Fireship does but I imagine they require a lot of editing so don't feel pressure to make all of them like this
@JarrodWatts3 жыл бұрын
Thanks so much! Definitely takes a bit of time to edit them together, but I have taken a lot of inspiration from Fireship as I love his style of videos too :)
@codelabspro2 жыл бұрын
Getting error - Module not found: Can't resolve firebaseui/StyledFirebaseAuth when I follow these steps
@cryptodev26153 жыл бұрын
I get a SyntaxError: Cannot use import statement outside a module error when deploying functions
@markyun86062 жыл бұрын
I am having same error, have you find out a solution?
@alexwarendh3 жыл бұрын
Jarrod! Amazing video! I'm starting to find "my" stack and this is spot on.
@JarrodWatts3 жыл бұрын
Thanks so much Alexander! It's such a fun stack to work with, I'm using it for my current project as well, hoping to make some more firebase + Next.js content soon too!
@alexwarendh3 жыл бұрын
@@JarrodWatts Looking forward to even more content! I really appreciate the saas perspective of it all as well.
@rockstarxprogrammer Жыл бұрын
This is already out of date in 2023: error - TypeError: Cannot read properties of undefined (reading 'apps')
@GungooseHonk2 жыл бұрын
I wonder if exposing envs with api keys to the browser via NEXT_PUBLIC prefix is a good idea. It will be inlined in your JS bundle and thus available for public eyes. Without this prefix it won't work tho. Any idea how to handle this issue?
@No_Name_Found_12 жыл бұрын
Running into the same issue. You can use JWT in the middleware to generate your own access token and using this in the application but will lose tha ability to use Google SIgn In ect...
@isadarc112 жыл бұрын
Great video! thanks so much! you covered so much in such a little amount of time!
@thekanimation3 жыл бұрын
This was fantastic. Thanks a lot
@IvanKleshnin2 жыл бұрын
4:05 NEXT_PUBLIC_* vars are available in the browser - that's the whole purpose of prefixing them with NEXT_PUBLIC_.
@williambjork27772 жыл бұрын
@4:14 Are you using some sort of key command/plugin to convert the config values into Next config values when pasting into the env.local file? Or did you just edit the video or am i a complete idiot? (bit of both perhaps)
@Nano-hb5kf5 ай бұрын
have you find out? i'm in the same situation😂
@williambjork27775 ай бұрын
@@Nano-hb5kf Dont remember lol. But pretty sure I just wrote the env variables by hand and copied the values from my firebase account one by one
@saeedet193 жыл бұрын
Right to the point! amazing. Good job Jarrod! Thanks for sharing it.
@lonesomesam3 жыл бұрын
Great video man. Surely helped a lot, thanks.
@jawyor-k3t6 ай бұрын
why did you use cloud functions for signup? couldn't you "manually" create a document when user clicks on the sign up button?
@cristiankeibersbardelotto7 ай бұрын
good work! excellent video and explanation!
@Dennis-McTatten2 жыл бұрын
Great tutorial. Fast paced
@takesomecoffee23633 жыл бұрын
I cannot make firebasui work for some silly css and node modules error
@hesamalavi93 жыл бұрын
use import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'; in your auth.js file instead of the import in the tutorial
@JarrodWatts3 жыл бұрын
@@hesamalavi9 Thanks mate! If it helps, the source code for the Auth file is here too: github.com/jarrodwatts/pineapple/blob/main/components/Auth.tsx
@hesamalavi93 жыл бұрын
@@JarrodWatts Thank you mate for this great video
@jakubkurdziel24073 жыл бұрын
The same problem, thanks for resolve
@cryptodev26153 жыл бұрын
@@hesamalavi9 thanks so much for the fix ✌
@Moochers2 жыл бұрын
Is there anyway to use this method for a like button? I would need to make the like/unlike unique to the post ID
@JonathanIhm3 жыл бұрын
This is really great content, this was exactly what I was looking!
@JarrodWatts3 жыл бұрын
Thank you so much Jonathan! That has made my day :-)
@LatinoWebStudio2 жыл бұрын
Thanks so much for the video!
@shawn-skull2 жыл бұрын
Ok. Chat GPT solved in a second all the issues about the outdated stuff related to firebase and FirebaseUI for me. What I don't understand yet is why you used functions to manage the users collection. Is it there any particular reason to do it so? Isn't not secure to handle it like the votes collection?
@guilhermemoraferia3 жыл бұрын
Great video, I keep getting this error if anyone could help me: ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization webpack default export being firebase at firebaseClient
@daylightismine17182 жыл бұрын
I also get this error and have no idea what to do. Did you figure it out?
@guilhermemoraferia2 жыл бұрын
@@daylightismine1718 I sort of magically started working after a while idk why, maybe it had something todo with cache or sm, what I suggest is you try and restart your PC, that might work.
@abhishekvishwakarma90453 жыл бұрын
Thanks your video helped me a lot
@JarrodWatts3 жыл бұрын
Thanks for letting me know Abhishek, glad it helped!
@Deepakguptasky2 жыл бұрын
Wonderful video .If you deploy this app on vercel. Will it work fine ?
@davidlintin Жыл бұрын
No idea why so many people add the user to the db client side. Fb functions is the best way to do this well done.
@magmalife73303 жыл бұрын
1:08 YOU BEAST
@denosorus2 жыл бұрын
Best tutorial on youtube
@momenwadood13422 жыл бұрын
Thanks for the video, how to pre render the votes list using SSR after each vote?
@chinmayabisoi3890 Жыл бұрын
A question though, why do we need cloud function to create user? We can simply create it like we were doing for vote document right?
@theceohq11 ай бұрын
You could, but it's not recommended. The main reason is that you risk exposing your database configuration and credentials to end-users if you create it via the front-end. Additionally, cloud functions allow you to trigger other side-effects, sanitise/format user data, etc.
@omfj2 жыл бұрын
I am a year late, but WOW, what a great tutorial!
@AI913 Жыл бұрын
I'm using TypeScript, and at 9:01 , there is an error Argument of type 'CollectionReference' is not assignable to parameter of type 'Query'. Type 'CollectionReference' is missing the following properties from type 'Query': converter, typets(2345) I don't know how to fix it. Anyone knows?
@BetterTechSol11 ай бұрын
Thank you!
@xExcisionx3 жыл бұрын
Thanks, great tutorial!
@JarrodWatts3 жыл бұрын
Thank you Ruben! Really glad you liked it!
@glitchinthematrix39343 жыл бұрын
Hey Jarrod I just came across an article about how this current method exposes our env to browser which isn't secure. Is there any secure method to do so?
@JarrodWatts3 жыл бұрын
Hey would you mind sending me the article for me to take a look at?
@raiyanthedeveloper2 жыл бұрын
Thank you so so much
@CesarSuareztrujillo2 жыл бұрын
Nice tutorial but understand that you can’t deploy nextjs app into firebase hosting or is there a way? Alternative to publish the app?
@spencersablan87652 жыл бұрын
Hey! I there is a solution to deploy on firebase! Here's a couple articles that helped me out a ton: dev.to/rowaxl/what-i-struggled-with-next-js-using-firebase-hosting-and-enable-ssr-4e67 medium.com/nerd-for-tech/lets-deploy-a-next-js-app-with-firebase-hosting-e070b3aecd04
@benjamindave48216 күн бұрын
Vercel
@bobbyLovesTech3 жыл бұрын
Thank you so much!!!
@Moochers2 жыл бұрын
How could I do it so that I use one button instead of two. Like a heart button for example. A ternary statement that if the user has "no" you turn it yes and vice versa. edit : I just figured it out. My next problem is that I'm using this method to make likes on some cards. The thing is that each card is unique. This method makes all card have the like... any way I can make them different?
@mmareplays46102 жыл бұрын
I get this error from the clientApp file "TypeError: Cannot read properties of undefined (reading 'apps')". anyone has that too?
@oliverhoad58382 жыл бұрын
Yep, me too
@AI9132 жыл бұрын
Did you fix it?
@nicobonder Жыл бұрын
AS this video has 2 years, I cant make work. He uses import firebase from "../firebase/clientApp"; but when I want to use it firebase is undefined. Someone can help to solve this issue? Thanks.
@Archicuus3 жыл бұрын
Hiya, When I set up the .env.local file and put 'process.env.VARIABLE_NAME'. I just get an error saying, the API key is invalid. All the credentials for me are correct. Can you help?
@JarrodWatts3 жыл бұрын
Hey, sure I can try my best to help. Where are you seeing that error - when it's deployed, or just on your local environment?
@radhee95543 жыл бұрын
@@JarrodWatts on local environment
@JarrodWatts3 жыл бұрын
Do you have NEXT_PUBLIC at the beginning of your environment variable name?
@radhee95543 жыл бұрын
@@JarrodWatts yes. Brother run npm again and it worked fine
@JarrodWatts3 жыл бұрын
@@radhee9554 Cool - glad to hear you got it working
@DaWizardOfOz72 жыл бұрын
firebase ui not working with React v18 :/
@kev11n_eleven Жыл бұрын
Can confirm. Won't even npm install.
@LEDsellers2 жыл бұрын
Is this tutorial still valid for next.js vs 13.1?
@benjamindave48216 күн бұрын
No
@tomascarignano50022 жыл бұрын
Hi Jarrod! I need your help big time mate. I recently tried to deploy my app to vercel, but I got an error. This error is because when I perform the deploy, vercel goes and looks at my /functions/ directory, tries to build, and cannot find a module in /functions/src/index.ts, because of course it's not present in /package.json Anyhow, appart from the obvious solution of git ignoring the functions directory, so that vercel wouldn't even look at it, I would like to know if there's a proper solution to this, and I think you might know one since I saw in your project's repo that you are, in fact, pushing the functions/ directory to github, and therefore deploying with vercel with it. Thanks so much in advance!
@tomascarignano50022 жыл бұрын
Made it work with .vercelignore
@robin94363 жыл бұрын
Thanks a ton!
@JarrodWatts3 жыл бұрын
No worries, glad you liked it and thanks for the kind comment :)
@tomascarignano50022 жыл бұрын
Thank you!!!!!
@SamyarBorder3 жыл бұрын
THX
@JarrodWatts3 жыл бұрын
No worries! Thanks for checking it out :)
@SamyarBorder3 жыл бұрын
@@JarrodWatts ❤
@matt-analoguelife3 жыл бұрын
Upto Auth - so far so good. Except, if you have 'Block 3rd party Cookies' set in Chrome Settings you cannot login with either Github or Google in my case.
@JarrodWatts3 жыл бұрын
Good to hear Matthew! That's an interesting point, would you normally have 3rd party cookies disabled for blocking tracking/ads?
@scorpion323 жыл бұрын
Shortest tutorial ever wow
@JarrodWatts3 жыл бұрын
Would you prefer them to be longer? Or do you like this pace?
@JeanMarcSkopek3 жыл бұрын
@@JarrodWatts It's awesome! You cover a ton of ground really quickly. Makes it a lot of fun to watch the first time round, and then I can rewatch and pause as I go from step to step. About to try that now with this project :)
@JarrodWatts3 жыл бұрын
Thanks! That's exactly what I'm hoping for :)
@maxthestranger3 жыл бұрын
Nice
@JarrodWatts3 жыл бұрын
Thanks Max! Appreciate it
@cleverengineer2410 Жыл бұрын
Consider moving a bit slower next time however great video but I didn't enjoyed it to be honest
@Molla_Mahir9 ай бұрын
Pineapple doesn't belong on Pizza dislike
@LarsRyeJeppesen2 жыл бұрын
God, Hooks are so horrible
@matthewbeardsley70042 жыл бұрын
using firebase.firestore().collection("votes") seems a bit cumbersome, what's the done thing...export this collection name from the clientApp.tsx file?
@Tyler-zb6ec2 жыл бұрын
V9 version of firebase.apps.length : import { getApps, initializeApp } from "firebase/app"; if (getApps().length < 1) { initializeApp(firebaseConfig); // Initialize other firebase products here } ^ so you dont have to stack overflow lol