Enjoying my videos? Sign up for FREE content here: https://www.thecoopercodes.com/

In this video I go over implementing login using the new Google Identity Services login. We use the Google Identity Services to authorize a successful Google login and then save the JWT in our React project. This tutorial is also useful when using external authorization alongside the google login authorization.

Business inquiry? Email thecoopercodes@gmail.com

source

38 Comments

  1. Thanks for this video, it helped me a lot! Is there a way to persist the logged in state on the page refresh? It was possible in the "old" login method with OAuth2, I wonder if we can achieve the same.

  2. i follows every step yet i'm getting error that google is not defined, i'm pretty sure that i wrote the script correctly in index.html and i followed the exact steps you done, any ideas ?

  3. Excellent explanations, thank you very much. I wanted to ask if someone after several times refreshing the page has shown this error in the console ? Uncaught ReferenceError: google is not defined I am using exactly the same code as this example

  4. Nice video! Can I make the login, checking user-mail in db? I think the userObject will have the email if user sign in google, right? Is it safe only check if the userObject email exists in my db?

  5. 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 💯💯

  6. Hi!! I'm still getting a google not defined error during mounting, how do you fix that??? I put the script in and you can access google object from the console but react will throw an error while rendering (not compiling, I disabled the linter for that) and will not render anything.

  7. HI, can we add our own custom styles to button apart from size, theme and width provided by google.For me, I want to change background of icon to dark, so for this I need some help to change, for which i didn't find any solution or api reference for the new google identity services. Do we have any other solution for that? if not, can we trigger event on click our own button, which will call the google auth api if this is possible, which particular function need to be used.

  8. When you set the src of the img to be the link to the picture, don't you need to authenticate that call with an access_token? I had problems in the past where at some point it would start to return 403

Leave A Reply

Please enter your comment!
Please enter your name here