Sir, You are awesome! You saved me from a big struggle. Thank you so much ^_^ I would like to see more videos about Firebase and api's from you. Please keep up the good work!
Loving these firebase vids. I got a use case that I am trying to figure out: How to leverage cloud functions to send an email when inappropriate content has been posted by a user? For example, when a user posts a comment and uses vulgar language, what's the best way to leverage Firebase (I am using FireStore) to notifiy me that there is in appropriate content? Just an idea for a future video!
I would create a cloud function for the save and before you do save it, check it for vulgar words. If it contains a bad word, send the email notification. This would be a good start for your list:github.com/RobertJGabriel/Google-profanity-words/blob/master/list.txt
Thanks a lot for a great tutorial! I like that you are explaining this in a framework-agnostic way. So, when you inserted the API_KEY into Postman, it seemed that you are simulating how a client would send the request to SignUp a user or SignIn a user. However, I thought that we should not ship the API_KEY with our client code? I am asking this because I am interested in writing a CLI (either in Node.js or Ruby) that would authenticate the user to Firebase. Initially, I used the same method as you (putting the API_KEY in the code) but I realized that this is not recommended. So how do you suggest to achieve this from a CLI?
Great video. But it's not clear for me how to make that authentificated user could get only his own data from the db. For example - his own array of todos or smth, not the whole todos collection from firestore
Inside of the auth middleware file, on line 32, you'll see something that says req.user = decodedTokenId. Then in your firebase function, you can grab that user's id by calling req.user.uid. Use that ID to query your collection or grab a subcollection off of the user. FYI, I have not tested this, but it should work or get you close.
Nice job! I have been following this tutorial and I would like to know how to generate and add the jwt authentication token bearer to my node.js function folder
thank for this video, but how about authentication using phone number, I mean my server code using .net core and use firebase phone number authentication. I still dont know how to do, can you explain or give me key word. thank you again.
Great stuff, this has been so helpful! I was wondering if you can give me some pointers as to how I can combine this with creating my own Oauth2 flow. What I'd like to do is to allow my users to use 3rd party apps to access my endpoint after successfully authenticating themselves. Any tips? Thanks!
I understand why it is that you made this tutorial agnostic and it is very helpful. Quick question though. How do I generate a bearer token without first posting/creating a new user? Because as it stands (and correct me if i'm wrong) I cannot GET the users from my firebase collection by simply using the "us-central1-projectname.cloudfunctions.net/user" until I first have a bearer token yet I don't know how to generate one on my own... Any input helps here :)
Dude you are so good! well done! clean quick explanation! just what I needed! quick easy set up no random craps! well done! keep up the good work!
Just what I needed. Thank you
wow awesome! I was searching for auth to use within my API in firebase cloud functions! thank you
THANK YOU, you saved me hours of pain in decoding JWTs!
your videos solved my months.
Your videos just saved my week!
Great tutorial, thank you very much!
Greetings from Brazil!
Sir, You are awesome! You saved me from a big struggle. Thank you so much ^_^ I would like to see more videos about Firebase and api's from you. Please keep up the good work!
Totally spot on. Best tutorial on the topic. Thanks for such a great tutorial. Looking forward to seeing more firebase videos. Thanks
Thank you! Glad you got value out of it. I’ll keep them coming.
Thank you for your video, I am one of the person waiting for this. Waiting for new videos in firebase.✊🏻
Awesome! I’ll be doing one on data validation next.
Diligent Dev I will be waiting for that
@@DiligentDev Please more firebase content with Vue/Nuxt!
very well explained
tq so much for a great explanation.
Tank you !!! Best !
Great tutorial... . will try all this out soon. One request -- Please use bigger fonts or zoom in a bit to the relevant place. Some of us are old.
Thank you! In my newer videos, I now zoom in on the code.
Great tutorial, really helped me a lot understanding Cloud functions better, thanks!
Please help me.I got a question. how can I get the login userID in index.js?
Thank you.I got a question. how can I get the login userID in index.js?
Thank you man, great tutorial, very brief and useful. keep it up
it doesn't work. It shows unauthorized even when I add the token in postman request
Dude, God bless you.. man
Hey, really good explanation!!! Thank your very much!!
Thanks. It was helpful
Loving these firebase vids. I got a use case that I am trying to figure out: How to leverage cloud functions to send an email when inappropriate content has been posted by a user? For example, when a user posts a comment and uses vulgar language, what's the best way to leverage Firebase (I am using FireStore) to notifiy me that there is in appropriate content? Just an idea for a future video!
I would create a cloud function for the save and before you do save it, check it for vulgar words. If it contains a bad word, send the email notification. This would be a good start for your list:github.com/RobertJGabriel/Google-profanity-words/blob/master/list.txt
que buen tutorial muachas gracias
great video! loved it :)
exactly what i needed! thanks!
You’re welcome! Glad it helped
Another great tutorial on firebase .Keep it up please !
Thank you! I’ll keep them coming.
hi, great tutorial, i have a question:
how can i restrict the Endpoint preventing User A from accessing User B data?
How we can test this middleware on firebase emulator as for this purpose we require a sign-in user
Thanks a lot for a great tutorial!
I like that you are explaining this in a framework-agnostic way. So, when you inserted the API_KEY into Postman, it seemed that you are simulating how a client would send the request to SignUp a user or SignIn a user. However, I thought that we should not ship the API_KEY with our client code?
I am asking this because I am interested in writing a CLI (either in Node.js or Ruby) that would authenticate the user to Firebase. Initially, I used the same method as you (putting the API_KEY in the code) but I realized that this is not recommended. So how do you suggest to achieve this from a CLI?
do you have any answer? thanks
How to use firestore database in this cloud function?
I don't know how to import ?
Awesome sir, it help me, thanks
i am getting this error Route.post() requires a callback function but got a [object Undefined]
Great video. But it's not clear for me how to make that authentificated user could get only his own data from the db. For example - his own array of todos or smth, not the whole todos collection from firestore
Inside of the auth middleware file, on line 32, you'll see something that says req.user = decodedTokenId. Then in your firebase function, you can grab that user's id by calling req.user.uid. Use that ID to query your collection or grab a subcollection off of the user.
FYI, I have not tested this, but it should work or get you close.
Nice job! I have been following this tutorial and I would like to know how to generate and add the jwt authentication token bearer to my node.js function folder
thank for this video, but how about authentication using phone number, I mean my server code using .net core and use firebase phone number authentication. I still dont know how to do, can you explain or give me key word. thank you again.
Great stuff, this has been so helpful! I was wondering if you can give me some pointers as to how I can combine this with creating my own Oauth2 flow. What I'd like to do is to allow my users to use 3rd party apps to access my endpoint after successfully authenticating themselves. Any tips? Thanks!
I understand why it is that you made this tutorial agnostic and it is very helpful. Quick question though. How do I generate a bearer token without first posting/creating a new user? Because as it stands (and correct me if i'm wrong) I cannot GET the users from my firebase collection by simply using the "us-central1-projectname.cloudfunctions.net/user" until I first have a bearer token yet I don't know how to generate one on my own... Any input helps here :)
Never mind, I ended up answering my own question.
Sorry, been super busy and havent kept up with UA-cam. Hopefully you just applied the middleware to the functions you'd like to protect :).
For sure. You answered the question I had in the video. I just had to give it another listen. Thanks again for a great tutorial 👍🏽
Can I use these functions without paying for a plan?
You can if you downgrade to Node 8.
Can u also make a video on this accounts:signInWithIdp
Are you referring to this? cloud.google.com/identity-platform/docs/multi-tenancy-authentication
Gracias amigo, me sirvió micho.
aquí dejo la nueva solución en NODE 14
app.use(authMiddleware.validateFireabseIdToken);