How To Add Google Sign In With Angular CORRECTLY! | 2023 Full Tutorial With Angular 14 .Net 6 App

  Рет қаралды 21,609

Israel Quiroz

Israel Quiroz

Күн бұрын

Пікірлер: 150
@BurnedPro
@BurnedPro Жыл бұрын
Big thanks man, what a luck that i get to your channel.
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Your welcome dude! happy to have helped and for u stopping by!
@souviksarkar4111
@souviksarkar4111 2 жыл бұрын
It helped me a lot . I was stuck on one of my projects. cheers.
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
I love hearing that 😊 I'm glad I could help out! I totally understand, this video took me longer than usual to make because of the lack of resources on it and how tricky it is, so I get ya but I'm glad it helped!!!
@BraydenGirard
@BraydenGirard Жыл бұрын
Great video that fills a gap in Googles Docs. As of the end of this month old method of authentication will no longer work and googles documentation overcomplicates how simple it is to update. This video was excellent for showing how this can be done, even for an existing older Angular app! Thanks a bunch.
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Appreciate the love Brayden!!! 🫶 It took me about two weeks of work to make this video cuz I agree the Google doc is VERY LIMITED so I'm happy u guys find the value in it and can slap it into your Angular projects! And I wanna make sure u guys have the latest and greatest!
@IcedCupcakes
@IcedCupcakes Жыл бұрын
OMG thank you so much for this! I realized too that all of the tutorials use angular social login and i was looking for one that doesnt and i finally found this! Thanks! You got a new subscriber!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Aw your welcome glad I could help someone running into the same issues I was! And welcome to the channel! 😊👍
@joseluisjimenez2672
@joseluisjimenez2672 2 жыл бұрын
I agree, this is the best way to use the new google sign in. Thanks for the video. Greetings from Cuba.
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Saludos!! :) and thank you for the comment and good vibes! i appreciate it, i worked hard to make sure it works haha
@tamaspeli9016
@tamaspeli9016 4 ай бұрын
This helped clear my mind out of documentation hell. Thank you!
@IsraelQuiroz
@IsraelQuiroz 4 ай бұрын
Your Welcome! i know the docs suck haha
@krzysztofwinnicki551
@krzysztofwinnicki551 Жыл бұрын
Thanks a lot! You saved my life :) Great tutorial with clear explanation
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Im so happy i could help you! i know how annoying the button is so im glad u loved it!
@peterabouabsi8427
@peterabouabsi8427 Жыл бұрын
Amazing dude. Great and helpful video!!!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thank u so much!!! Happy I could help!
@ZiaulHaqOfficial-786
@ZiaulHaqOfficial-786 Жыл бұрын
Great video, you really solved big problem, best wishes for you and your channel and please keep it up
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thank you! that google login video, boy did this video take me a long time but i knew i was definitely not the only one struggling with this :) so im happy u and many others have found value in it! hope to see u other places on the channel!
@ZiaulHaqOfficial-786
@ZiaulHaqOfficial-786 Жыл бұрын
@@IsraelQuiroz I was struggling to implement it for one of client but now after watching your video. I rocked it. All credit goes to you.
@tommy--k
@tommy--k Жыл бұрын
Thanks much Israel great video! I am using a Django backend, and this worked great.
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
your welcome! thank u for the support and comment im happy that my frontend portion was able to help you with your django backend!
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Will you guys be adding the Google Sign In to your next Angular App? Why or Why Not?
@cynthianwakaeme2331
@cynthianwakaeme2331 Жыл бұрын
Thank you so much, Google docs didn't do justice to this as you. Great tutorial 🥳
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thank you so much how sweet of you to say!!! BUT I AGREE the google documentation is not good enough so i'm happy i can help you guys out :)
@Sinaiii
@Sinaiii Жыл бұрын
Dropped a like for the nice tutorial, keep it up!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thank u! :)
@danylobozhagora1551
@danylobozhagora1551 Жыл бұрын
Honestly how tf isn't it this video promoted to the first page of google when you are looking for the damn thing. thank you so much brother
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i heard if people like u keep commenting and liking the video it will be soon :) thank u so much!
@binhhoang2112
@binhhoang2112 2 жыл бұрын
Your videos are always close and practicable, keep up the good work buddy
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Aww thank u so much I'm happy to hear that 😊
@lodebosmans8957
@lodebosmans8957 Жыл бұрын
Great tutorial. You deserve the acknowledgement for it. I was struggling very hard to set this google login up with Google Identity. So thanks a lot!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i appreciate the comment so much, made my night! i worked really hard on that video and i understand the struggle because it was a huge struggle to do it too haha before me nothing really worked like i needed it so im happy i could help u!
@lodebosmans8957
@lodebosmans8957 Жыл бұрын
@@IsraelQuiroz As I am going further with my application, I need to adjust the code. I am a bit puzzled why the entire setup needs to check passwords? Isn't it the goal of OAuth2.0 that I do not need to worry about passwords (that is for google)? I just want to receive a token and compare it to the tokens in my database. Or what am I missing here?
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
@@lodebosmans8957 the person in your application still needs an account, otherwise whether when they sign in with gooogle you create there account then or when they sign up, they need an account otherwise how do u sign someone in if they dont exist
@GrassXMagnum
@GrassXMagnum Жыл бұрын
I am working on a new (rewritten) Angular app with a legacy backend, and the old app was setting the redirectUri as a Handler (ashx) in the backend, which would then send some JS back to the client, telling it to close the popup and start using the API. It works, but as I see here, callback to backend is not necessary at all and should actually callback to frontend first, then validate access_token using backend API & set token in cache. Anyway, thanks for this, your vid saved me a lot of head scratching today!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Your welcome! im happy u found it helpful! and there are a few ways to handle the google part of it, i just like the way i did it in the video since it gives me more control of every step
@avg_user-ty2eg
@avg_user-ty2eg Жыл бұрын
thanks man , this was very helpful , i've been trying for days to get it to work using different libraries that most of them can't even work on angular 15
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
love to hear that! happy i could help out! and i totally get that, ide always rather use the official SDK from the company than a third party library that has to keep up, that was my focus when making it and im glad its what u needed
@avg_user-ty2eg
@avg_user-ty2eg Жыл бұрын
@@IsraelQuiroz Keep it up man
@erndidi
@erndidi Жыл бұрын
Has anyone had an issue with the import for typescript? I added "typeRoots": ["node_modules/@types"] to my tsconfig, added a d.ts file to declare the google-one-tap module, but I still can't get it imported.
@yaredalmaw6644
@yaredalmaw6644 8 ай бұрын
Cool Lecture and demo .
@IsraelQuiroz
@IsraelQuiroz 8 ай бұрын
Your welcome! :)
@ibrahimakhalilougueye4854
@ibrahimakhalilougueye4854 Жыл бұрын
you are the best brother ❤❤❤❤❤❤
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
no problem my guy :)
@GiorgiChikovani_FromGeorgia
@GiorgiChikovani_FromGeorgia 9 ай бұрын
Thanks brother helped a lot
@IsraelQuiroz
@IsraelQuiroz 9 ай бұрын
your welcome! :)
@ifor3on640
@ifor3on640 Жыл бұрын
very great video i am using this way in my app right now and i have one question how to get more information from google when requesting from angular where to put the scope i want to get gender and birthday for example
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i believe you have to add the scopes in the google login popup, for the information google sends back since the user has to consent to it, so for some assistance i found some links that should help you out stackoverflow.com/questions/16501895/how-do-i-get-user-profile-using-google-access-token developers.google.com/identity/openid-connect/openid-connect#obtainuserinfo Hope these help!
@godriusRJ
@godriusRJ 2 жыл бұрын
Just fantastic! Thank you very much for sharing.
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Your welcome Rodrigo! :) I appreciate the love and support
@godriusRJ
@godriusRJ 2 жыл бұрын
@@IsraelQuiroz man, it really helped a lot! Regards direct from Brazil
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Muito Obrigado :)
@jean-philippeleclerc5055
@jean-philippeleclerc5055 Жыл бұрын
Wow thanks! Very helpful😄
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
your welcome! :) im glad it helped!
@Xm0On
@Xm0On Жыл бұрын
excellent vid man
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
I appreciate the support! thank u! hope to see u on the channel again soon!
@salvatoregesualdo9940
@salvatoregesualdo9940 Жыл бұрын
Thank a lot. Made my day
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
My pleasure 😊
@hamidrezafarhadnia3571
@hamidrezafarhadnia3571 5 ай бұрын
Hello, thank you for the great training you had. The project link is not available!!! Please fix it
@TolgaKoseoglu
@TolgaKoseoglu Жыл бұрын
Great video! Exactly what I was looking for. Do you have another video using a different external authentication provider? Maybe Facebook or Microsoft?
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Appreciate it! and no i do not have anything for signing in with those other two but def they are future video idea
@חןנעם
@חןנעם Жыл бұрын
Hi Israel, I’ve an old angular 1.5 that I need to add the login button, can you guide me?, or send me a link for the appropriate video
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
you should probably work first on trying to update it to a more modern version of angular before doing it but if u cant my video should be a solid guide but your implementation will be different, there isnt much of any help on doing this for angular im sorry about that what do u see thats different or from my video that doesnt work?
@חןנעם
@חןנעם Жыл бұрын
@@IsraelQuiroz I’ll try learn from your video
@peterrosser1217
@peterrosser1217 Жыл бұрын
Great video! By the way, your ClientId is not secret, but the ClientSecret is. In future videos, you may want to redact the ClientSecret instead of the ClientId. :)
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
appreciate the compliment :)
@regimelesmoras7805
@regimelesmoras7805 4 ай бұрын
nice tutorial bro, can you teach me how to customize the css of the google sign in button?
@IsraelQuiroz
@IsraelQuiroz 4 ай бұрын
you get that code from google so its something you would have to investigate there because Google does not give you many customizations to the button its pretty standard for obvious reasons
@regimelesmoras7805
@regimelesmoras7805 4 ай бұрын
@@IsraelQuiroz oh i see i just want like the icon single word "G" ahaha but whenever I try to have css its not woking XD any thanks, new subscriber here ehehhe
@nonamezz20
@nonamezz20 10 ай бұрын
Can you make a tutorial with sso saml and Microsoft entraId? One login and access to multiple apps ?
@sagarharkut6408
@sagarharkut6408 2 жыл бұрын
Thanks a lot buddy!!!
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
no problem! :) happy to hear u found the video useful, have a great day!
@kake1829
@kake1829 4 ай бұрын
Great video!! I see that the github repos are no longer available, is that intentional?
@IsraelQuiroz
@IsraelQuiroz 4 ай бұрын
I appreciate that!! :) And yeah they are members only now!
@kake1829
@kake1829 4 ай бұрын
@@IsraelQuiroz Just became a member!
@JustPlainRob
@JustPlainRob Жыл бұрын
When you use the login_uri response the return values from Google are passed as URL query parameters to your specified endpoint. Google's api is a modified OAuth2 flow.
@vikaskyatannawar8417
@vikaskyatannawar8417 5 ай бұрын
Is it single sign in? i.e. if I run two such apps logging in or logging out effects the other app too?
@georgeblazhev
@georgeblazhev Жыл бұрын
That's a great video! Could this be implemented using oidc library for Angular instead of the Google js library? Thank you
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
appreciate it! and i am not sure if it would or not
@HyrskiyGames
@HyrskiyGames 5 ай бұрын
Holly god why is it not on the fuking tutorials, this is so simple, thanks you alot, where did you find it?
@IsraelQuiroz
@IsraelQuiroz 5 ай бұрын
Your welcome!!!! :) And it doesn't exist anywhere literally as far as I know haha I had to figure out the solution on my own! It took me like 1 week
@samadbouss8842
@samadbouss8842 2 жыл бұрын
excellent tutorial.I really appreciate your time and dedication. Keep up the good work
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Thank you so much for the compliment :) i really appreciate the feedback, have an awesome day!
@samadbouss8842
@samadbouss8842 2 жыл бұрын
@@IsraelQuiroz by the way the window.onload() method inside the onInit() is redondant. I spent quite some time to figure out why when I navigate to the login path the signIn button doesn't come up but it would when I refresh the page. That's basically because whenever you navigate to the login component the window.onload is never triggerd but it is when we refresh the page. All I had to do was to remove the window.onlad and let the onInit do its job.🤖
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
oh thank you so much for catching that and explaining! i appreciate it :)
@samadbouss8842
@samadbouss8842 2 жыл бұрын
@@IsraelQuiroz you're welcome 😊
@alexandruvilcu217
@alexandruvilcu217 Жыл бұрын
great job!
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thanks for the compliment!
@aymanmihidine210
@aymanmihidine210 9 күн бұрын
As far as i know placing any key like the client id in the front end is not safe and can be accessed by clients. What should we do in this case ?
@IsraelQuiroz
@IsraelQuiroz 9 күн бұрын
Check out my video on Https only cookies! :) kzbin.info/www/bejne/iIDKYqNmir9_Zq8si=IAHQ-CUyeNmgYrp0
@pvinayak96
@pvinayak96 Жыл бұрын
Pop up window exposes client id in the url though we protect it in the frontend @22:57. I dont think it would be a concern.
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
as long as its not your secret it doesnt matter
@mukeshn1746
@mukeshn1746 2 жыл бұрын
thank you so much😁
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Your welcome! :)
@umeshshelke725
@umeshshelke725 Жыл бұрын
click on google signin button and then navigate to logout page or any other page and then again come back to login page . there is bug and bug is "google signin button is not displaying"
@matheusjoveliano
@matheusjoveliano Жыл бұрын
I am having the same problem :(
@umeshshelke725
@umeshshelke725 Жыл бұрын
@@matheusjoveliano window.reload() resolve my issue
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i pushed a few updates to the gitRepo for that video just now, but i am not seeing that error, my google button on my app when i click log out correctly clears the refresh token/jwt and doesnt throw any errors, make sure u have all the code correct on the logout method
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i pushed a few updates to the gitRepo for that video just now, but i am not seeing that error, my google button on my app when i click log out correctly clears the refresh token/jwt and doesnt throw any errors, make sure u have all the code correct on the logout method
@umeshshelke725
@umeshshelke725 Жыл бұрын
@@IsraelQuiroz don't do logout just normally navigate back or from another page navigate to login page without doing logout..you will see that error
@jayakumar2927
@jayakumar2927 10 ай бұрын
It is global any gmail user can able to login otherwise who need to login in this application we need to configure their cliend id and secret keys?
@sjsurya7413
@sjsurya7413 Жыл бұрын
where you have created interceptor
@anupamdutta4551
@anupamdutta4551 2 ай бұрын
above github source code links are not working. It is showing PAGE NOT FOUND .Could you please share source code github link
@IsraelQuiroz
@IsraelQuiroz 2 ай бұрын
All GitHub repos are members only now $3 to join
@MrKillerPT0
@MrKillerPT0 Жыл бұрын
Shouldnt we compare the google password with the password saved in your "database" when loggin in? For security reasons
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
i dont think u need to because google is doing the checking for u, we are offloading the responsibility of signing in on google, that account while in the db it would get treated as a seperate account compared to let's say if we built a traditional account that isn't google, think of many websites these days, u can either sign in with google or with them and they get treated as two different accounts when u sign in with google its offloading the responsibility to google, i dont think u need to but its your call if u want to
@nitishsujeebun6724
@nitishsujeebun6724 Жыл бұрын
I have a node.js backend. Any help with this please?
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
they should have the equivalent code as my c# backend for node.js i just dont have that im sorry, u should be able to find that code if it helps on my backend
@onlylovelyvibes4467
@onlylovelyvibes4467 4 ай бұрын
hey sir , i could not find the source code in the video's description
@IsraelQuiroz
@IsraelQuiroz 4 ай бұрын
code is now exclusive to members, become a member and you get access to the repo
@mukeshn1746
@mukeshn1746 2 жыл бұрын
I am getting this error "JWT contains untrusted 'aud' claim".
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Did you fix this issue?
@patrickhume5899
@patrickhume5899 2 жыл бұрын
i got this too but worked out that i hadnt set GoogleClientId in the .NET project, soon as i did it resolved that issue
@yop6356
@yop6356 2 ай бұрын
Your github repo is deleted ?
@IsraelQuiroz
@IsraelQuiroz 2 ай бұрын
It's channel members only :) let me know if u sign up!
@isuckatthisgame
@isuckatthisgame Жыл бұрын
Are these deprecated?
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
No this is the one that works 😁🤙🏼 I show which package is the one that is being deprecated
@МаксимЛеонтьэв
@МаксимЛеонтьэв Жыл бұрын
Hey Israel,thanks a lot for this video.That's really helpful. Like and Subsribtion from me :)
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Of course! happy to hear it helped you out! Welcome to the family :)
@walektine
@walektine Жыл бұрын
volume pretty low (( dislike
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
lol turn the volume up problem solved
@martind.6245
@martind.6245 8 ай бұрын
I am using Angular 17.1.2 and there seems to be a problem with the localhost apiUrl and private path = environment.apiUrl. The error [TS2339] says the Property 'apiUrl' does not exist on type '{}'. [plugin-angular-compiler]
@martind.6245
@martind.6245 8 ай бұрын
after replacing environment.apiUrl with localhost:7274/, now I get [ERROR] TS2304: Cannot find name 'expect'. [plugin angular-compiler] src/app/services/auth.service.spec.ts:14:4: 14 │ expect(service).toBeTruthy();
@martind.6245
@martind.6245 8 ай бұрын
After adding "jasmine" to types in tsconfig.app.json the errors ceased, but now there is no Google login button anywhere.
@IsraelQuiroz
@IsraelQuiroz 8 ай бұрын
Did you create your environment file with property apiurl that is the localhost path to your apil?
@geraldbustos
@geraldbustos Жыл бұрын
.bind(this) was key for me! i didnt know that
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
:)
@patrickhume5899
@patrickhume5899 2 жыл бұрын
i was getting "This browser or app may not be secure" in the google sign in pop up so i had to run chrom like so ".\chrome.exe --remote-debugging-port=4200"
@IsraelQuiroz
@IsraelQuiroz 2 жыл бұрын
Thank you for the comment and giving a short solution since i did not run into that
@PeterZach
@PeterZach Жыл бұрын
Thanks, this helped me a bunch! I experienced an issue when navigating from a different in-app page to login because (hypothesis) window.onGoogleLibraryLoad() has already fired and isn't going to fire again on navigation.
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
that seems to make sense, ideally i guess u wouldnt want go back there or make it an option while u are signed in but anyways haha im glad the video helped!
@PeterZach
@PeterZach Жыл бұрын
It’s an issue when you are navigating from the registration page or home page to login. The button won’t show. I don’t have a workaround yet. Regardless, great video! I’ll def give it an upvote.
@PeterZach
@PeterZach Жыл бұрын
I'm just posting here in case this helps someone in the future. My workaround is to run the google script at the component level instead of in index.html. This ensures that window.onGoogleLibraryLoad() is fired when entering the login view. I don't think there are any downsides to doing this but it seems to work. Oh, Angular... import { ElementRef } from '@angular/core'; constructor( private elementRef: ElementRef ) { } ngAfterViewInit() { var s = document.createElement("script"); s.type = "text/javascript"; s.src = "accounts.google.com/gsi/client"; this.elementRef.nativeElement.appendChild(s); }
@IsraelQuiroz
@IsraelQuiroz Жыл бұрын
Thank you so much for posting this! i appreciate it alot!
@macbookHuhu
@macbookHuhu Жыл бұрын
@@PeterZach saved me thanks!
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 66 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 16 МЛН
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 2,9 МЛН
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 26 МЛН
How To Deploy Angular 14 .Net 6 Web App To Azure FULL TUTORIAL!
24:15
Don't Use Polly in .NET Directly. Use this instead!
14:58
Nick Chapsas
Рет қаралды 67 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
Next.js 15 Breakdown (Everything You Need To Know)
18:10
Web Dev Simplified
Рет қаралды 17 М.
How To Become A DevOps Engineer in 2023? | Skills To Learn
20:34
Travis Media
Рет қаралды 583 М.
AI HYPE - Explained by Computer Scientist || El Podcast EP48
1:25:26
El Podcast
Рет қаралды 274 М.
React vs Angular in 2024
9:00
Kodaps Academy
Рет қаралды 60 М.
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 66 МЛН