Implement google sign in angular | Login in with google in angular | Google authentication angular

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 59

  • @brogrammers
    @brogrammers  Рік тому +2

    You can watch part-2 ua-cam.com/video/chREkmVEOMI/v-deo.html for getting logged in user details from google in response and perform sign out.

    • @MohBrik-wb3si
      @MohBrik-wb3si Рік тому

      ,, ,,,w,,,,,, ww,,,w,,,,,,,,,,,,w,,ww,,,,,,w,w,,,,w,,,,,w,, ,,,,,,,,,,,,, ,,,,,w,w,w,,x,,,,!? ? ? ? ?????w?????????????? ? ? ? ? ???????????

  • @brodo9919
    @brodo9919 3 місяці тому

    you are the king, thanks for saving me a lot of time! Nice tutorial brother

    • @brogrammers
      @brogrammers  3 місяці тому

      Thank you for watching 💜

  • @bifacial605
    @bifacial605 6 місяців тому

    In my project i have several components, My sign in button only showed itself in index.html. On other pages like Authorization.html in Authorization component does work and shown as 0 width 0 height. Maybe you can help me how to implement styles from script or why it now render fully on page?

    • @brogrammers
      @brogrammers  6 місяців тому

      Styles for signin button are provided by google itself that you can surely configure upto some extent or you can write your own css to fully customise it in your application as you want using proper button selector in CSS and overriding CSS rules.

  • @jamespatel7215
    @jamespatel7215 10 місяців тому

    I have successfully login with Gmail account now where can I seen which account has been logged in on Google cloud console ?

    • @brogrammers
      @brogrammers  10 місяців тому

      You don't get to see which account logged in on cloud console. It is pointless for console to store this information. It is not possible.

    • @jamespatel7215
      @jamespatel7215 10 місяців тому

      @@brogrammers got it bro 👍

  • @stanislavsemenets8224
    @stanislavsemenets8224 11 місяців тому

    Hi, what happen if u reload the page after logged in? Because, in my case shows modal of login in again.. thx!!

    • @brogrammers
      @brogrammers  11 місяців тому

      Yeah that could be true, I did not implemented a full state management here in this example rather purpose was to show how to integrate google sign in in angular. You need to implement state management in your routes so that angular knows when to redirect to which page. E.g. if user logged in goto dashboard, if logged out goto login screen.

  • @mahdiandalib186
    @mahdiandalib186 8 місяців тому

    thx man, plz create a full webapp using angular

    • @brogrammers
      @brogrammers  8 місяців тому

      Thanks 👍 sure, happy to do that. What kind of wepapp you'll be interested in?

  • @rezzuse
    @rezzuse Рік тому +1

    hey dude, thanks for the video. everything is happening good but it's about the data-login_uri parameter of the sign-in button. You use your API url, which redirects to your Angular url (4200/dashboard). Thing is I don't wan't to handle my user datas directly with this button, and when I just put localhost:4200/dashboard in this parameter instead of the API url (so then I can just use my Angular service I already have to send the datas to my backend), it does not work, like it can't find the /dashboard path once I am logged (it works before logging). Can you by any chance help me with that? thanks :)

    • @brogrammers
      @brogrammers  Рік тому

      That is very correct scenario you mentioned. If data-login_uri is used controls goes back to backend/ web service. But since in your case you don't wish to do it then you can use something called callback event & keep control at Angular side itself, same I demonstrated in next video if you are interested you can give a try- ua-cam.com/video/chREkmVEOMI/v-deo.html

    • @rezzuse
      @rezzuse Рік тому

      @@brogrammers also are we limited in term of number of connexions with this button? I was working on my project and the button just disappears from my dom, in any of my git branches, but I can't find any log about this on the google platform :/

    • @rezzuse
      @rezzuse Рік тому

      @@brogrammers and thanks for the repply !

  • @thannirushruthika3503
    @thannirushruthika3503 5 місяців тому

    Hi, iam trying to do its not showing any thing after running. Iam not getting the google sign in

    • @brogrammers
      @brogrammers  5 місяців тому

      let me check & get back 👍

    • @dnyaneshwargiri
      @dnyaneshwargiri 5 місяців тому

      Can you please create issue over GitHub repo in that way I can fix it quickly. GitHub repo link is in Description & everyone has permission to create issue on repo.

  • @GOPIJITINKhatana
    @GOPIJITINKhatana Рік тому +1

    Superb job sir❤❤❤

  • @zh1094
    @zh1094 Рік тому

    i followed the steps but when i paste the HTML in the HTML of the angular component, it doesn't show anything there at all. I inspected, the code i added is there, but google button is not visible.

    • @brogrammers
      @brogrammers  Рік тому

      I've also given my working source code in description, you can check it if you missed something.

    • @zh1094
      @zh1094 Рік тому

      @@DeepakPandey-ls3qx To resolve this issue i rendered the gis script when the angular component is mounted or something like that. Then it worked for me.

    • @sakthibalats1565
      @sakthibalats1565 9 місяців тому

      @@zh1094 i have same problem could you please explain berifly

  • @hitechmedia3887
    @hitechmedia3887 11 місяців тому

    I have downloded your code all things are work well but after click on google login it opening a third window in blank

    • @brogrammers
      @brogrammers  11 місяців тому

      As I get time- Let me go through the code & rectify it to accommodate any new changes in google lib happened.

    • @dnyaneshwargiri
      @dnyaneshwargiri 5 місяців тому

      Can you please create a issue over GitHub repo tagging me in in that way it becomes convenient for me to actually fix issue than writing here in UA-cam comments. Hope you understand, thank you 🙂

  • @fighterlife3644
    @fighterlife3644 6 місяців тому

    Thank you! It is great!😀

  • @bluewhale.068
    @bluewhale.068 5 місяців тому

    my login btn not showed, i'm using angular 17 with ant design + tailwind@@ pls helpme!!!

    • @Yuri-b7s
      @Yuri-b7s 5 місяців тому

      im having the same issue with angular 17. did you happen to find a solution?

    • @brogrammers
      @brogrammers  5 місяців тому

      Please create issue on GitHub repo. It is almost impossible for me to solve any issue in UA-cam chat.

  • @mrx4256
    @mrx4256 Рік тому +1

    Thank you so much❤

  • @SatishChauhan-s1t
    @SatishChauhan-s1t Рік тому

    Cross-Origin-Opener-Policy policy would block the window.closed call. getting this error

    • @brogrammers
      @brogrammers  Рік тому +1

      Mostly it throws this type of error if there is misconfiguration in allowed origin in domain on your google developer console

  • @gopalarajanaika
    @gopalarajanaika Рік тому

    Thanks, bro, How to get user info like first name, last name, email, token ...

    • @lestercoronado2026
      @lestercoronado2026 Рік тому +1

      I need the same info.

    • @brogrammers
      @brogrammers  Рік тому

      It is easy once you set-up this, making a separate video on it. You can refer documentation link in description if you like to try on your own.

    • @brogrammers
      @brogrammers  Рік тому

      please watch ua-cam.com/video/chREkmVEOMI/v-deo.html for getting logged in user details from google in response

    • @brogrammers
      @brogrammers  Рік тому

      please watch ua-cam.com/video/chREkmVEOMI/v-deo.html for getting logged in user details from google in response

    • @brogrammers
      @brogrammers  Рік тому

      please watch ua-cam.com/video/chREkmVEOMI/v-deo.html for getting user details from google as response

  • @ravisankar7209
    @ravisankar7209 Рік тому

    Hi bro, any video for data-callback

    • @brogrammers
      @brogrammers  Рік тому

      Hello, can you please elaborate exactly what data callback you are looking?

    • @ravisankar7209
      @ravisankar7209 Рік тому

      I watched ur other video sign in with Google and I solved my problem. Thank you 👍 bro

    • @brogrammers
      @brogrammers  Рік тому

      perfect! 🙂

  • @TheLeftdead4
    @TheLeftdead4 5 місяців тому

    Perfect

  • @vakilsingh5086
    @vakilsingh5086 Рік тому +1

    why body empty?

    • @brogrammers
      @brogrammers  Рік тому +1

      You need to provide permission from dev console which manages what all details one get in response like profile image, name and few other.

    • @vakilsingh5086
      @vakilsingh5086 Рік тому +1

      @@brogrammers can you please provide me a link where i need to add?

    • @brogrammers
      @brogrammers  Рік тому

      @@vakilsingh5086
      There is something called scope of token where you would found it in console's, you can check documentation for exact path.
      By the way....you can try below code at client side which does same thing.
      function onSignIn(googleUser) {
      var profile = googleUser.getBasicProfile();
      console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
      console.log('Name: ' + profile.getName());
      console.log('Image URL: ' + profile.getImageUrl());
      console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
      }
      Reference- developers.google.com/identity/sign-in/web/sign-in

    • @OnYourRankML
      @OnYourRankML Рік тому

      @@brogrammers I followed all the given steps and also given the steps. Still empty body. The user details should come through the resuest of the POST call on server side right? Any sample request payload?

    • @Hari-zc3lj
      @Hari-zc3lj Рік тому

      @@OnYourRankML yea I want to know the same I am not getting any user information from the req

  • @tahirhusain3035
    @tahirhusain3035 Місяць тому

    Bhai thoda aaram se bolte to sahi rahta