User Profile Pictures with React Authentication and Cloud Storage (with Firebase v9)

Sdílet
Vložit
  • čas přidán 12. 12. 2021
  • Upload user profile pictures to Firebase Cloud Storage. Link Authentication with Cloud Storage with Firebase Web v9 Modular.
    The code used in this video:
    github.com/LogicismX/React-Fi...
    Firebase Auth Documentation:
    firebase.google.com/docs/auth...
    Firebase Auth Playlist:
    • React Authentication C...
    Timestamps:
  • Věda a technologie

Komentáře • 70

  • @faisalshaikh7994
    @faisalshaikh7994 Před 4 měsíci +1

    This helped me even after 2 years of uploading. Great work, you guys are real heros

  • @thivankawaduge509
    @thivankawaduge509 Před 2 měsíci +1

    Thank you so much for save my time. I have been searching this for complete an assignment.

  • @MiikaKontio
    @MiikaKontio Před 2 lety +1

    Great tutorial. Easy to follow. I got my avatar pictures working now

  • @dionardomarques18
    @dionardomarques18 Před 2 lety +1

    Thank you a lot man, you helped a lot with my project using the authentication and storage in firebase.

  • @byui-masa
    @byui-masa Před 2 lety +2

    Thanks so much for teaching me (us) Firebase 9!!!!! Appreciate a lot!!

  • @danielodiase6824
    @danielodiase6824 Před 2 lety +2

    I haven’t watched the vid I just saw it got put up but I know it’s going to be great ! Ur the man keep on going

    • @ravenjs
      @ravenjs  Před 2 lety +1

      haha Daniel thank you so much for your kind words :))

  • @ControlAllDa1337
    @ControlAllDa1337 Před 2 lety +5

    Thank you so much for this, really helped me out. For any readers in the comments you can restrict the input element to only allow images by adding the *accept="image/*"* tag for all images, or if you only want jpg/jpegs you can use *accept="image/jpeg"*

  • @bornclasher1294
    @bornclasher1294 Před 8 měsíci +2

    Bro you are a pro. Love u. Thanks for this great video. Now I have successfully add user profile functionality in my website by following your video.

  • @emonkhanedward5946
    @emonkhanedward5946 Před 6 měsíci +1

    very very helpful. thank you dear. keep the good work

  • @paulcochrane6389
    @paulcochrane6389 Před rokem

    This is super helpful, thank you! 😄

  • @eves.2825
    @eves.2825 Před rokem +1

    You're amazing

  • @Luftjunkie
    @Luftjunkie Před rokem +2

    Mate, thank you very much. I've seeking for the solution for 3 hours and haven't found. You're great, I am totally thankful for this video. Ones again Thank you. I was thinking, I won't find, but than I found you, and my developer's life resurrected again!

  • @toppmoviehighlights
    @toppmoviehighlights Před rokem +2

    This is helpful. great video.

  • @maazahmed7771
    @maazahmed7771 Před 2 lety +1

    Thanks buddy it helped a lot

  • @kimhwanhoon
    @kimhwanhoon Před rokem +1

    Thank you my teacher!!!
    for the custom hook, before I use it and make login and logout button disappear I used redux so I can change its className to hidden lol but this was just some lines of code... it blew my mind!

  • @ropepe3059
    @ropepe3059 Před 2 lety +3

    Hey Logicism. I love this series of React/Firebase tutorials! I am beginner and your videos helped me a lot! Thanks and if you can make one video about user roles that would be great!

    • @ravenjs
      @ravenjs  Před 2 lety +2

      hi Ropepe thank you so much for this comment, i'm glad the video helped! And about the user roles, that is very high up on my todo list in my video ideas.. implementing firebase auth with react-router and storage

    • @ropepe3059
      @ropepe3059 Před 2 lety +2

      @@ravenjs Then we will wait :D Thanks once again for great job ;)

  • @smitpatel6620
    @smitpatel6620 Před 2 lety +2

    Totally underrated video

  • @Clytax
    @Clytax Před 2 lety +2

    amazing video thank you!

  • @yusufaltundal3482
    @yusufaltundal3482 Před rokem +1

    Very helpful. Thank you

  • @bharatsinhparmar3666
    @bharatsinhparmar3666 Před rokem +2

    Nice and informative

  • @gokulkrishna.s5691
    @gokulkrishna.s5691 Před rokem +1

    Great tutorial 😍

  • @kinstar
    @kinstar Před 2 lety +2

    that question mark (Optional chaining) is amazing 😃

    • @ravenjs
      @ravenjs  Před 2 lety +1

      yes it totally is xD

  • @Btc314btc
    @Btc314btc Před 2 lety +2

    Thank you so much!

  • @dimpless25
    @dimpless25 Před 2 lety +2

    THANK YOU!

  • @Strategic.
    @Strategic. Před 4 měsíci

    I have a problem when I navigate through different pages, the profileImageSrc state gets set to the default picture for a little bit till the actual one gets loaded, it's feeling weird how can I fix it

  • @enjoyyourlife4399
    @enjoyyourlife4399 Před 2 lety +1

    thank you sir

  • @danielc4991
    @danielc4991 Před rokem +1

    Thanks for the video. I do have a question though. If you were to logout after creating a user and profile pucture. Then Log back in would the profile picture you previously stored render?

  • @whoIsDeck
    @whoIsDeck Před 2 lety +2

    Hey Logicism! I love your series.Can you please make video on a subCollection in firebase

    • @ravenjs
      @ravenjs  Před 2 lety +1

      glad you love the series! do you mean subcollections in Cloud Firestore? If so, yes im cooking up a video on that :))

  • @willyhorizont8672
    @willyhorizont8672 Před 2 lety +1

    Sir can I ask a question ? How can I do populate a ref in document like in mongodb but in firestore?

  • @thomasvanreijn8569
    @thomasvanreijn8569 Před rokem

    Hi, thanks a lot for this video! I m building a react listing marketplace web app, users can upload their data and cover image with a form, before i watched your video i had a problem because i can only upload cover pics with my file uploader in the form. I wanted to have a coverphoto on the listing page aswell a profile photo, you gave me the solution by uploading the profile photo on the signup form, now i want to render this photoURL on the listingpage, i keep getting errors, do you have any suggestion how to do this?
    Thnx for the great video!

  • @cyliaalileche6445
    @cyliaalileche6445 Před 2 lety +2

    please continue as soon as possible I will continue with you

    • @ravenjs
      @ravenjs  Před 2 lety +1

      thank u so much Cylia haha

  • @animamanakar4052
    @animamanakar4052 Před 2 lety +1

    How can we implement this using firestore?Please help
    For storing other details too
    Like name and age

  • @JanetteKing
    @JanetteKing Před 2 lety

    how can we then add the file path URL from the storage into firebase database?

  • @altcoinalpha
    @altcoinalpha Před rokem

    I keep getting the error, snapshot is assigned a value but never read - from .firebase does anyone know how to fix this?

  • @BenjiFriedman
    @BenjiFriedman Před 2 lety +4

    I was getting a 403 permission error when uploading. On the firebase page in the Rules tab, I changed it to
    rules_version = '2';
    service firebase.storage {
    match /b/{bucket}/o {
    match /{allPaths=**} {
    allow read: if true;
    allow write: if request.auth!=null;
    }
    }
    }
    and it worked. Though I read this might not be a good idea in production

  • @user-wo1os3ow1q
    @user-wo1os3ow1q Před 2 lety +1

    I want you to teach me how to upload Image and text into storage and firestore and display on another page.

  • @cyliaalileche6445
    @cyliaalileche6445 Před 2 lety +2

    you are the best

    • @ravenjs
      @ravenjs  Před 2 lety +1

      you the best too hehe :))

  • @lenart2552
    @lenart2552 Před 2 lety +2

    hey Logicism, great work with this series; what about passing currentUser to another page from "/" to "/photo"?

    • @lenart2552
      @lenart2552 Před 2 lety +2

      hm, let me say that when u refresh page there is moment that currentUser is undefined (u see login page), then server respond (u see photo page) - how to avoid that?

    • @ravenjs
      @ravenjs  Před 2 lety +2

      ​@@lenart2552 unfortunately, this is just the way that Firebase is built.
      if you really want a way around this, you can implement a global loading state within react to show a loading screen while firebase auth is initialising

  • @nazaryipyryg6491
    @nazaryipyryg6491 Před 2 lety +1

    hi!
    thx you very much for your lesson!
    but i have a question:
    i have lots of users and each of them has a photo.
    how can i display their pictures in users list?

    • @ravenjs
      @ravenjs  Před 2 lety +2

      You'd store their pictures in Firebase Storage, then store the url in each user's profile in Firestore, then use .map() to make a users list in your React App. Hope this helps!

  • @bazirakkalguksu1480
    @bazirakkalguksu1480 Před 2 lety +2

    After watching your video, I became a solid learner of firebase. However, this error occurs when uploading the file.
    storage/unauthorized Firebase Storage: User does not have permission to access
    I wrote the code exactly like you.
    Can you give me an answer?

    • @ravenjs
      @ravenjs  Před 2 lety +2

      perhaps it's your auth or firebase security settings? there is a section in the firebase console for "Auth rules"

  • @danielodiase6824
    @danielodiase6824 Před 2 lety +2

    Everything worked for me till i got to the part where the profile picture displays on the app.
    i keep getting this error "userInternal.getIdToken is not a function".

    • @ravenjs
      @ravenjs  Před 2 lety +1

      just checkin, did you manage to fix this?

    • @danielodiase6824
      @danielodiase6824 Před 2 lety +1

      @@ravenjs thanks for checking in , yeah it was due to where I placed my code , but I got it sorted out and my code worked great !!!

  • @aramabdulrahman2087
    @aramabdulrahman2087 Před 2 lety +2

    next add edit ,delete functionality with add user detail.. thanks

  • @danielodiase6824
    @danielodiase6824 Před 2 lety +2

    If possible for the next vid can you show how you will create multiple user profiles ?!

    • @ravenjs
      @ravenjs  Před 2 lety +1

      by multiple user profiles do you mean multiple users?

    • @danielodiase6824
      @danielodiase6824 Před 2 lety +2

      @@ravenjs yeah multiple users. Each user is able to post thier own unique content

    • @ravenjs
      @ravenjs  Před 2 lety +1

      @@danielodiase6824 unique content? yea basically we just have to link auth to firestore.. which i plan ondoing in the next vid :))

  • @newbieCieL
    @newbieCieL Před 2 lety +2

    Why I get Error FirebaseError: Firebase: Error (auth/network-request-failed)?

    • @ravenjs
      @ravenjs  Před 2 lety +1

      have you tried any other browsers e.g. Firefox, Chrome, Edge ? Do you get the same errors?

    • @newbieCieL
      @newbieCieL Před 2 lety +1

      @@ravenjs I'm using chrome, and I've also seen the error appear in your video using firefox

    • @ravenjs
      @ravenjs  Před 2 lety +1

      @@newbieCieL in the video? could you comment the timestamp

    • @newbieCieL
      @newbieCieL Před 2 lety +1

      @@ravenjs 20:20 in console

    • @ravenjs
      @ravenjs  Před 2 lety +2

      @@newbieCieL oh that haha for me it was just a temporary error that goes away after i refresh the page. is it crashing your app totally?

  • @abrarmulla1196
    @abrarmulla1196 Před 2 lety +2

    lllllesss goooo