Google Identity Services Login with React (2023 React Google Login)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 551

  • @thecyrusj13
    @thecyrusj13 ปีที่แล้ว +71

    Thanks!

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +22

      Yo this is my first super thanks! And the fact that its 10 bucks! You are way too kind, thank you so much :) this channel is genuinely a labor of love which I hope people see in the content, and I look forward to providing more in the future. This donation genuinely means so much to me. Thank you for your kindness.

    • @thecyrusj13
      @thecyrusj13 ปีที่แล้ว +9

      @@CooperCodes Oh yeah. You're welcome. Enough for a down payment on a six pack of beer right? Good luck with everything.

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +6

      Hahaha I'll use my down payment wisely, thank you for the kind words and support

  • @HemantDuttaHD
    @HemantDuttaHD 2 ปีที่แล้ว +89

    You're a life saver mate! I was following a 5 hour long tutorial trying to make social media app using react and the guy was using the outdated method for this google oauth thing and I was losing my mind. Thank you so much! You've been a huge help!

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว +5

      You are absolutely welcome, glad to see my video got you on your way.

    • @weizhao7896
      @weizhao7896 2 ปีที่แล้ว +1

      hey, have u successfully updated the google sign-in from the old version? I watched this video and come back try to fix the old one, but just get stuck T^T

    • @HemantDuttaHD
      @HemantDuttaHD 2 ปีที่แล้ว +1

      @@weizhao7896 I followed this tutorial and things worked perfectly

    • @ayushnegi3610
      @ayushnegi3610 2 ปีที่แล้ว +6

      From javascript mastery right?

    • @weizhao7896
      @weizhao7896 2 ปีที่แล้ว +4

      @@ayushnegi3610 for me, yes. Lol

  • @luberalexanderechavarriabe4156
    @luberalexanderechavarriabe4156 ปีที่แล้ว +7

    Everyone does not have the skill to teach easily and clearly mate, but you do. You made it simple and straightforward, thanks a lot.
    I got the error, google doesn't exist, Just in case someone else gets the same, you have to add window. google.............(add window before google)

    • @Manja-rd3dr
      @Manja-rd3dr ปีที่แล้ว

      Thanks 😃

    • @DanielMShawn
      @DanielMShawn ปีที่แล้ว

      This saved me hours, thank you!

    • @solo-yl8uc
      @solo-yl8uc ปีที่แล้ว

      thanks, but I wonder why is he didn't get an google doesn't exist error...

    • @charleneleclerc9205
      @charleneleclerc9205 11 หลายเดือนก่อน

      not working for me, i have always an error "window.google.account is undefined" and i don't understand why😢
      Sorry in advance for my english

  • @pippinbloom
    @pippinbloom ปีที่แล้ว +9

    In viewing this, I didn't realize that the comment /* global google */ was actually necessary and not just a regular comment.Thank you so much!!

  • @selim3291
    @selim3291 ปีที่แล้ว +1

    Thanks a lot! Not just for the Google Login, you are telling what are you doing step by step. This is so important to understand the logic of the code.

  • @oscargalvez7
    @oscargalvez7 ปีที่แล้ว +12

    Amazing tutorial! I have watched plenty of tutorials overall and this is one of the easiest to understand and straight to the point. Also, I loved how I just did what you said and it worked the first time! That doesn't happen often. Keep it up 💯💯

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +1

      Thanks so much for the comment! Glad the content was helpful :)

    • @oscargalvez7
      @oscargalvez7 ปีที่แล้ว

      @@CooperCodes Sure it was, I already implemented it into my app. Great work!

  • @Bruno87198
    @Bruno87198 2 ปีที่แล้ว +3

    Thanks for the video! The "/* global google */ explanation was really helpful!

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว +1

      Thank you, appreciate it! The global google is a little strange, but I found it to be a good solution when depending on scripts from your HTML like I discussed in the video. Appreciate the support

  • @LuisPerez-MATB
    @LuisPerez-MATB 10 หลายเดือนก่อน +1

    Perfectly working October 2023, thanks for the tutorial! Very easy and understandable

    • @user-gm3xp8yi9b
      @user-gm3xp8yi9b 9 หลายเดือนก่อน

      hey i need help , idk there is an error jwt_decode is not a function
      can you help me with this?

    • @simransingh5496
      @simransingh5496 9 หลายเดือนก่อน

      @@user-gm3xp8yi9b yeah i just ran into this, if you go into the node_modules and see, the current function is actually jwtDecode (without the underscore).

  • @thecyrusj13
    @thecyrusj13 ปีที่แล้ว +8

    Thanks so much dude. Google Technical Support couldn't even help me out as much as you did. The official Google docs on this didn't even mention React (as far as I know). The docs were frightening and I thought I would never figure this out with all the rabbit holes and snail trails. But anyway, I've watched 4 other videos on one-tap and yours is the first one that makes use of the sign in button if the user is not already logged in. One note I would add is that instead of using /* global google */ you can use window.google.accounts.id, etc. When I searched for "google one-tap" I didn't find your video. I had to search for "google signin". So if you added "one-tap" as a tag or search word it might increase your views (if you haven't already). It's nice that I didn't have to set up fake server and use the google-auth-library package for this to work also.

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +3

      Yeah hah when I made this video this stuff was super fresh. If I were to do the video over again I would definitely grabh google from the window object like you suggest, luckily its a one line fix but still wish it was in the video. Glad this was helpful! The Google documentation is surprisingly awful... considering its yah know... Google???

  • @suryaafs
    @suryaafs ปีที่แล้ว +1

    I was looking for profile object and then it turn out to be decoded credentials. You're such a life saver, thank you so much! What an amazing tutorial

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      You're very welcome, glad it helped you out especially in that specific scenario :)

  • @user-fq7jf6cp9p
    @user-fq7jf6cp9p ปีที่แล้ว +1

    You've earned a sub and a like, you know how to program things really well and explain it to beginners so we dont scratch our heads until hair starts falling off. You showed me that I have a programming knowledge deficiency.

  • @selectablekitchen5315
    @selectablekitchen5315 2 ปีที่แล้ว +1

    OMG THANK YOU!!! I went through hours of "beginner" guides before I could find tNice tutorials and at least make a simple soft... Only video I've

  • @frontend_ko
    @frontend_ko 6 หลายเดือนก่อน +1

    thanks, man. it works perfectly. instruction is simple and concise

  • @PersianShare
    @PersianShare ปีที่แล้ว +1

    JUST WOOOW, super clear, I WISH I COULD HAVE LIKE THIS VIDEO MORE THAN ONCE

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +2

      You can like this comment too! Thanks for watching hahaha

  • @Morexod999
    @Morexod999 2 ปีที่แล้ว +2

    It was helpful as hell, like a bless after hours spended with implicit google API docs

  • @lowmikow1099
    @lowmikow1099 4 หลายเดือนก่อน

    Thank you som much for this tutorial! I've been looking for well-explained installation and usage of the new Google login!

  • @aneeshmohanan5121
    @aneeshmohanan5121 4 หลายเดือนก่อน +1

    10:49 The updated jwt decode code is
    import {jwtDecode} from 'jwt-decode';
    const userObject = jwtDecode(response.credential)
    console.log(userObject)
    posting this as I had error when executing the code in video. so thought might be helpful for anyone watching

  • @kushagra4401
    @kushagra4401 2 ปีที่แล้ว +2

    Thank you so much for this. you are a life saver. i was having problems working with old oauth and spent hours on it. finally this worked

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว +1

      Glad to see it was helpful! Thank you for watching and supporting :)

    • @kushagra4401
      @kushagra4401 2 ปีที่แล้ว

      @@CooperCodes Hey! is there any way we can customize the button rendered by it, like i want to align it center by default it is right aligned. i have tried css properties and different ways but couldn't figure it out

    • @rajatkushwaha279
      @rajatkushwaha279 2 ปีที่แล้ว

      can u send the code?? It's too long to write :{

    • @kushagra4401
      @kushagra4401 2 ปีที่แล้ว

      @@rajatkushwaha279
      const googleLogin = (res) => {
      const userCred = res.credential;
      const user = jwtDecode(userCred);
      // use the user data
      };
      useEffect(() => {
      /* global google */
      google.accounts.id.initialize({
      client_id: "your client id here",
      callback: googleLogin,
      });
      // mention id of btn, here i used googlelogin
      google.accounts.id.renderButton(document.getElementById("googleLogin"), { theme: "outline", size: "large", fullWidth: true });
      }, []);

    • @rajatkushwaha279
      @rajatkushwaha279 2 ปีที่แล้ว +1

      @@kushagra4401 Thanks :)

  • @merzeofficials7344
    @merzeofficials7344 9 หลายเดือนก่อน

    just started learning react and came across your video. it took my entire day but worth it as its working same as he shown his video! but there were some code declaration errors which I faced. but still bundles of thanks

  • @fardinkashef3604
    @fardinkashef3604 ปีที่แล้ว +1

    That's how a tutorial should be. Great job. I really liked it.

  • @bugraotken
    @bugraotken 9 หลายเดือนก่อน

    Among all the other videos related with React and Google auth, this is the far most helpful video. I can't thank you enough =))

  • @shireensheikh505
    @shireensheikh505 7 หลายเดือนก่อน

    2024 Jan- this works! Thanks man for making this video! Helped me loads

  • @yyk9881
    @yyk9881 ปีที่แล้ว

    Easy to follow, voice is clear, explanations are perfect!!!!!!!

  • @KamTuPLAY
    @KamTuPLAY 2 ปีที่แล้ว +1

    Thank you! I used old version of google sign in and it threw me an error. So I decided to use new method and found your video. Thanks again for helping)))

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว +1

      That is so great to hear that the video solved your problem! I made the video for people transitioning to the new login system, so glad to see it helped that case :)

  • @user-fv7vy7dq4f
    @user-fv7vy7dq4f 7 หลายเดือนก่อน

    Awesome!! Clear and accurate explanation. It helps me a lot. Thank you so much!

  • @karengallardo4480
    @karengallardo4480 2 ปีที่แล้ว

    I tNice tutorialnk you speak for a good portion of us.

  • @kaaarkaaa3492
    @kaaarkaaa3492 2 ปีที่แล้ว

    Agreed. All the others just turn your brain upside down. Nice tutorials is simple.

  • @Patwal77
    @Patwal77 ปีที่แล้ว +1

    Thanks! way better than google documentation.

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      Thank you so much for the donation, glad the video was helpful! Genuinely donations like this make my day and help me realize the impact my content has on others, so thank you.

  • @mohammadrahman8911
    @mohammadrahman8911 2 ปีที่แล้ว +16

    Thank you for this! Qq...once the user is logged in...what's the recommended approach for backend API authorization? If I have an Express backend...can you send the Bearer token in the header?

    • @osrs-raph
      @osrs-raph ปีที่แล้ว

      You could use a library that allows you to set cookies and create a "token" cookie, then on the backend verify that token. I'm not sure about the backend details but I'm sure there is a function to validate it.

  • @abdirisaqqasim3726
    @abdirisaqqasim3726 ปีที่แล้ว

    Your video was extremely helpful and easy to follow. It saved me a lot of trouble. I would be grateful if you could make another video on how to redirect pages after login. Thank you for your assistance.

  • @ajdin1250
    @ajdin1250 2 ปีที่แล้ว +2

    Awesome explanations, thank you very much Sir.

  • @bobross2404
    @bobross2404 ปีที่แล้ว

    Great video, helped me create a sequence diagram for explaining this process. Liked!

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      Glad it was helpful :) thanks for watching

  • @ShakilKhatri1
    @ShakilKhatri1 10 หลายเดือนก่อน

    This is exactly what I was looking for!
    Thanks!

  • @davidjunior390
    @davidjunior390 2 ปีที่แล้ว +1

    Overall best tutorial on this... Many thanks!!

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      Thanks I really appreciate that!

  • @mahdirafi6537
    @mahdirafi6537 หลายเดือนก่อน

    Very helpful... Thanks a lot

  • @mohsenahmadi4851
    @mohsenahmadi4851 2 ปีที่แล้ว +2

    Thanks for such a great tutorial. It was really helpful!👍🏻💯

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      Thank you so much for the comment! Appreciate the support

  • @billschnoebelen40
    @billschnoebelen40 ปีที่แล้ว

    Thank you, thank you, thank you!!! I have been trying to get an old program running for two days. None of my old stuff worked. All the tutorials I tryed did not work. Nothing gave me the token!

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      Glad the tutorials could help, thanks so much for commenting! :)

  • @solo-yl8uc
    @solo-yl8uc ปีที่แล้ว +3

    does anyone get "Cross-Origin-Opener-Policy policy would block the window.postMessage call." error?

  • @LS_Roblox-DG
    @LS_Roblox-DG 2 ปีที่แล้ว

    Thanks for sharing your valuable experience.

  • @elpeliculero5570
    @elpeliculero5570 2 ปีที่แล้ว

    Thanks so much for your thoughtful and detailed videos! On to the soft!

  • @mtejera
    @mtejera ปีที่แล้ว

    Thank you so much! Amazing and straightforward tutorial. I appreciate it a lot!

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว +1

      Miguel thank you so much for watching and leaving a comment. I appreciate you back :)

    • @durgaprasadthandra4066
      @durgaprasadthandra4066 ปีที่แล้ว

      Can any one help me I got "Google is not defined" error

  • @johnfox4914
    @johnfox4914 2 ปีที่แล้ว +1

    Well done, thank you for this tutorial.

  • @condorkunka
    @condorkunka 6 หลายเดือนก่อน

    Thank you, Cooper Code, for providing such a through explanation! It was incredibly helpful.

  • @daniyaldk946
    @daniyaldk946 2 ปีที่แล้ว

    All of my computers got the softwares here. I first install them on virtual environnt to make sure they're not malware. So I can assure

  • @getachewsharew5904
    @getachewsharew5904 ปีที่แล้ว

    Life Saving.
    God bless you bro.

  • @williamcuervo4252
    @williamcuervo4252 ปีที่แล้ว

    up to now. Your soft is great too!

  • @davidharmeyer3093
    @davidharmeyer3093 2 ปีที่แล้ว +2

    This is insanely helpful. Thanks so much.

  • @medweb8690
    @medweb8690 2 ปีที่แล้ว +1

    Wow, this is a great tutorial. I'm having to force the npm install of react-google-login. Is there another updated package? I'm googling where to find such an update since the deprecation on July 29th. Thank you for taking the time to make this video for all to see.

  • @victorpaulguzmansoto5575
    @victorpaulguzmansoto5575 2 ปีที่แล้ว

    Great, I'm lucky, it works great for me without errors

  • @chetanarora7402
    @chetanarora7402 ปีที่แล้ว

    Thanks man. I was struggling to find the google auth latest solution.

  • @brandonwie4173
    @brandonwie4173 8 หลายเดือนก่อน

    Thanks a ton. Wish they had typescript files for d.ts. Subed!

  • @huzaifac137
    @huzaifac137 ปีที่แล้ว +2

    Not working it's throwing error google is not defined in the browser and script link is throwing 404 aborted in console

  • @ciyaarahadunidaoffical5474
    @ciyaarahadunidaoffical5474 2 ปีที่แล้ว

    in the details. when you get stuck, roll back to the beginning and start over. The other weay is to focus entirely on one set of commands

  • @hassaanhameed9624
    @hassaanhameed9624 ปีที่แล้ว

    Good tutorial, Thanks a lot, It was simple and concise.

  • @JackKrivan
    @JackKrivan 2 ปีที่แล้ว

    Your a life saver tipo thank you for this I've been struggling with this for weeks now thank you

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      Glad I could help, thanks for watching!

    • @durgaprasadthandra4066
      @durgaprasadthandra4066 ปีที่แล้ว

      Bro I am struggling Can any one help me I got "Google is not defined" error

    • @JackKrivan
      @JackKrivan ปีที่แล้ว

      @@durgaprasadthandra4066 nah for some reason this stopped working for me

  • @Quo777
    @Quo777 8 หลายเดือนก่อน

    Thanks a lot, you've save my day!

  • @Chase20224
    @Chase20224 2 ปีที่แล้ว

    Thanks! Your video content is the safest and most useful

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      Thank you! Appreciate the comment and glad it was useful

  • @abdulladoo5096
    @abdulladoo5096 2 ปีที่แล้ว

    very much thank you!
    You are a really good teacher.
    Thank you again :)

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว +1

      Thank you kindly for the comment :) always appreciate those who are willing to learn, thank you for the kind words.

  • @internetdrew
    @internetdrew ปีที่แล้ว

    A fantastic fix I thought was broken. Make sure to check your extensions for anything that may be aggressively blocking. It wouldn't let me get anything from the gsi link. Disabled the extension: problem solved.

  • @knuckless__
    @knuckless__ ปีที่แล้ว +1

    somebody wrote on ts?
    do you know how solve the problem with that(type script can not find a google..)
    maybe later gonna be more problems witch you solved
    can you write here solve?

  • @user-yp2ic9ol1m
    @user-yp2ic9ol1m 2 ปีที่แล้ว

    i really appreciate it! Exellent tutorial! from korea

  • @MatheusFerreira-ut5tc
    @MatheusFerreira-ut5tc ปีที่แล้ว

    Thank you for saving my life in my job lol

  • @faheemahmad5882
    @faheemahmad5882 ปีที่แล้ว

    You are so underrated 🙌 thanks

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      Thanks for watching Faheem, appreciate yah :)

  • @imamhiday140
    @imamhiday140 2 ปีที่แล้ว

    Truly life saver, thank you for the code i really apreciate it !

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      I got you! Thanks for watching

  • @onegentig
    @onegentig 10 หลายเดือนก่อน +1

    But what if I need some restricted scopes?

  • @PetriikVx
    @PetriikVx ปีที่แล้ว

    Simple and amazing, thank you!

  • @aqua-vc2oe
    @aqua-vc2oe 2 ปีที่แล้ว

    there! Thanks a lot for the help, I'm going to subscribe to your channel and keep up with all the videos!

  • @dudewithdonuts7639
    @dudewithdonuts7639 7 หลายเดือนก่อน

    Great tutorial man

  • @temiemmanuel3580
    @temiemmanuel3580 2 ปีที่แล้ว

    Awesome! Learnt a few tricks from this.

  • @rahulprajapat1087
    @rahulprajapat1087 ปีที่แล้ว

    Great Work Bro , Appreciated !!

  • @FGA-47
    @FGA-47 ปีที่แล้ว

    this was really helpful. Thank You

  • @ishakbekhti6175
    @ishakbekhti6175 2 ปีที่แล้ว

    Trying to make a soft you hear in your head co to life might be the hardest part starting out but I guess that requires so solid

  • @auditrihumbas177
    @auditrihumbas177 2 ปีที่แล้ว

    Nice tutorial Michael,

  • @nextdev3637
    @nextdev3637 2 ปีที่แล้ว +1

    Thanks bro. I just put credentials instead of credential. The little 's' made me brower for 30 minutes.

  • @hardkite
    @hardkite 2 ปีที่แล้ว

    thanks, i will do my best to have patience for tNice tutorials because i normally don't have much, i wish there were chapters here so i could skip

  • @romuloneedy
    @romuloneedy ปีที่แล้ว

    Thanks for the video.
    There is a way to change this way, to save a token.
    This would be to make future integrations, even if the user is not logged in and within the application?
    For example, creating events in Google Calendar.

  • @mohamadelhamed1098
    @mohamadelhamed1098 2 ปีที่แล้ว

    ITS WORKING! nice job dude

  • @kanhatiwari7150
    @kanhatiwari7150 2 ปีที่แล้ว +2

    why i am getting error every-time that "google is not defined" although my app is working fine but error message show every-time and then i have to close it manually any solution to this issue?

  • @LordKaos666
    @LordKaos666 ปีที่แล้ว

    Really, a very useful video, thanks!

  • @foreigner268
    @foreigner268 2 ปีที่แล้ว +2

    Thanks for the video. Is there a way to format the Google signin button to use Material UI? I want it to use my theming.

  • @realhavir1295
    @realhavir1295 2 ปีที่แล้ว

    Life saving my man, life saving!

  • @SubashBalasubramanianLatentVie
    @SubashBalasubramanianLatentVie หลายเดือนก่อน

    Hello,
    index.html Using both async and defer together is technically allowed, but it does not follow the intended usage of these attributes and can cause confusion. According to the HTML specification, if both attributes are present, the async attribute takes precedence, and the defer attribute is ignore.

  • @niravthakar3813
    @niravthakar3813 ปีที่แล้ว +1

    Thank you for providing valuable contents. Do you have any example to work with oauth 2.0 working with scope parameter to fetch the authorization code and then token?
    It will be great help if you have it. Thank you for your time.

    • @viktoriazruttova
      @viktoriazruttova ปีที่แล้ว

      Hi, since you commented 11 days ago I assume you were successfully able to run this tutorial. I ca't run this because it shows error: 'google' is not defined... I included script in index.html...

  • @dheerajs5774
    @dheerajs5774 2 ปีที่แล้ว

    Great! Thanks for the solution.

  • @amanrawat9622
    @amanrawat9622 ปีที่แล้ว

    Thanks works perfectly 🎉

  • @umairkiani3391
    @umairkiani3391 ปีที่แล้ว

    Thank you so much , your video helped alot.

    • @CooperCodes
      @CooperCodes  ปีที่แล้ว

      You are very welcome! Thank you for watching :)

  • @underworld-of-gaming
    @underworld-of-gaming ปีที่แล้ว +1

    How to display google sign up button instead of google sign in button

  • @guruigang
    @guruigang ปีที่แล้ว

    Thank you so much. So clear.

  • @benjamingartner5288
    @benjamingartner5288 ปีที่แล้ว

    Insane thank you man!

  • @anoopisaac
    @anoopisaac 10 หลายเดือนก่อน

    thanks for the amazing concise tutorial. I have doubt regarding what needs to be one token expires. Do I need to force user login again?

  • @HuKuTozZ
    @HuKuTozZ 2 ปีที่แล้ว

    Best guide. Thank you

  • @DhruvGoel-jc1lp
    @DhruvGoel-jc1lp 2 ปีที่แล้ว

    Thanks alot man this video really helped me

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      You're welcome! Glad it helped :)

  • @saerakurbanova680
    @saerakurbanova680 2 ปีที่แล้ว

    thank you so much for this tutorial❤❤❤

  • @aylanelson1012
    @aylanelson1012 ปีที่แล้ว +1

    Love the Tutorial:
    Is there any reason that the token might fail? And do you have suggested work arounds!
    Cross-Origin-Opener-Policy policy would block the window.postMessage call.

  • @kuentasapp1199
    @kuentasapp1199 2 ปีที่แล้ว +6

    Great video! just one question, how can I use the token to avoid the login every time the page gets refreshed?

    • @PardoLiat
      @PardoLiat 2 ปีที่แล้ว

      I think I have the same problem, when refreshing it asks me to login again. Did you find any solution for that?

    • @sahilverma_dev
      @sahilverma_dev 2 ปีที่แล้ว +2

      for this you have to store the user data in localstorage and if there is no data in localstorage only then make a login call

    • @sahilverma_dev
      @sahilverma_dev 2 ปีที่แล้ว

      @Sai karthik Varanasi you can find detailed articles on the web.

    • @sahilverma_dev
      @sahilverma_dev 2 ปีที่แล้ว

      @Sai karthik Varanasi basically when user gets logged in google returns a object. just store that object into the localstoage and for next write the code in such way that first it'll look to the localstorage for the user data if its null or not exist login the user and if user data is present in the localstorage then no need to login the user.

    • @kushagra4401
      @kushagra4401 2 ปีที่แล้ว +1

      @Sai karthik Varanasi you have to store data in localstorage. you can do it by localStorage.setItem() function it takes two parameters first, what you want to name it lets say 'profile' and in second you have to pass data in string format (JSON.stringify). now when you want to access the data on refresh you can get data in useEffect (after refresh) using localStorage.getItem('profile') you have to pass the name you chose like i took profile for example.

  • @icebare139
    @icebare139 ปีที่แล้ว

    Thanks. really helpful

  • @Magnify.
    @Magnify. ปีที่แล้ว

    If the user logged in and then refreshed the page will it undo their log in and ask them to log in again?

  • @mymysticvoyages
    @mymysticvoyages 4 หลายเดือนก่อน

    You are a 10 on 10

  • @carmelchurchsatchiyapuram2292
    @carmelchurchsatchiyapuram2292 2 ปีที่แล้ว

    you are literally the best

  • @PiratesK1999
    @PiratesK1999 ปีที่แล้ว

    Great Video. But I have one question
    Can we add scopes in order to access google photos or google drive?
    I working on app that need both of these APIs.
    Thanks btw