How to integrate AWS Cognito with Google Social login?

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 64

  • @securityinaction1018
    @securityinaction1018  2 роки тому +1

    Please subscribe to this channel for regular updates ua-cam.com/channels/EEayyyCrJO94FYlzF0NLTg.html
    Thank You for the support.

  • @CaroToeic
    @CaroToeic 2 роки тому +3

    very good, tks
    hope i can see more videos from your channel in the future

  • @JesseJohnson-c4p
    @JesseJohnson-c4p Рік тому

    Excellent walkthrough

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

    ok...Thank you for ur response...hope it is helpful for me. But still, I have a doubt that when used for mobile application client secret is not obtained, so how can I proceed?

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

      You can use the OIDC PKCE Authorization code grant flow for mobile apps. Refer docs.aws.amazon.com/cognito/latest/developerguide/using-pkce-in-authorization-code.html

  • @pedromoreira1311
    @pedromoreira1311 2 місяці тому

    What extention are you using to clean the cookies?

    • @securityinaction1018
      @securityinaction1018  2 місяці тому

      There are many Add ons in Firefox. Try this one addons.mozilla.org/en-US/firefox/addon/cookie-remover/

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

    @securityinaction1018 thank you! can you please tell how to map attribute updated_at ? thanks

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

      Do you want to map the updated_at claim of Google ID token to a Cognito user attribute?

  • @botorocho
    @botorocho 2 роки тому +2

    Hi! excellent video I'm already subscribed

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

    how can i add users in user pool when launching mobile apps

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

      Users can self-register or you can use APIs to create user in a user pool. If you can share more details on the exact scenario, I will try my best to provide a solution.
      Please like, subscribe & share this video / channel !! Thanks in advance.

  • @johngrant7197
    @johngrant7197 2 роки тому +6

    the audio is pretty bad at times. its like you're covering up the mic.

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

    This was really helpful, thank you!

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

      Glad it was helpful! Please subscribe to support the channel. Thank you!!

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

    i have added all steps to add user to the user pool, finally when I try login in with google,I get the message flutter: {"message":"Unauthorized"}. can you help me in solving this

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

      In general, "Unauthorized" error means client ID / secret used for Google login is wrong. Please verify that and test it again.
      Please like, subscribe & share this video / channel !! Thanks in advance.

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

    great video.
    now I have created custom signup and login forms, and for both the forms I want to place social login buttons.
    I tried many things but failed, how can I connect the social login with the custom buttons

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

      Thank you!
      The button should link to Cognito's authorization endpoint. Refer this documentation docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html.
      If you want the button to redirect to Google, you can pass identity_provider=Google as a query parameter along with other parameters in the authorization endpoint. In this case, Cognito will not show the hosted UI login page. Instead it will redirect to Google for authentication.
      Please subscribe and support this channel. Thanks in advance!!

  • @Jameel.shaik5858
    @Jameel.shaik5858 Рік тому

    what if i want this to use by custom page with out using hostedui what is the approach how should i integrate

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

      You can check out these docs for custom authentication flow with a custom UI. docs.amplify.aws/lib/auth/getting-started/q/platform/js/
      docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html

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

    Thank you so much! it was really helpful!

    • @securityinaction1018
      @securityinaction1018  4 місяці тому

      Glad it helped!
      Please like, subscribe & share this video / channel !! Thanks in advance.

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

    Thanks for the great tutorial. There is a scenario where the user should create by Google in cognito. we have created user ( manually or API ). we just have to do Google SSO on existing users. Is this possible?

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

      @securityinaction1018 Hi, could you please look on this? I do not want create user name with google _random number . I want to create my users and the do auth

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

      Yes, you can link the federated user i.e. google user with the local user which was created before the user logged in for the first time. This can be done when the user logs in for the first time through Google. Take a look at the this documentation docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html
      Please like, subscribe & share!! Thanks in advance.

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

      @@securityinaction1018 thank you. Do you have any video tutorials regarding this to understand in easy way?

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

      I don't have it at this point of time. But, I will try to post it in future.

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

    hello im getting this error after opening the hostedui You can’t sign in because this app sent an invalid request. You can try again later or contact the developer about this issue. Learn more about this error
    If you are a developer of this app, see error details.
    Error 400: redirect_uri_mismatch

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

      If the error is thrown in hosted UI, it means the redirect_uri parameter value sent to Cognito is not matching with the redirect_uri configured for that client_id.

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

      How to resolve this error?

  • @monalipatel6655
    @monalipatel6655 2 роки тому

    How can we add this sign in button with react app? From react app i need to login with google and add user to cognito

    • @securityinaction1018
      @securityinaction1018  2 роки тому

      You can integrate the react app with Cognito using OpenID Connect. Cognito will show the sign in button for Google and create a profile when the user successfully logs in using Google

    • @monalipatel6655
      @monalipatel6655 2 роки тому

      @@securityinaction1018 I have created auth with aws amplify in react. I got access token and token id but not getting refresh token. How can I get refresh token?

    • @securityinaction1018
      @securityinaction1018  2 роки тому

      I am sure refresh token should be available. Can you try hitting the token endpoint directly using a curl command or postman and validate the response?

  • @thundergod-tp4es
    @thundergod-tp4es Рік тому

    If i have multiple service running in aws,can i use this to authenticate all service

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

    i have implemented it. But when i am trying to login for the 2nd time, it is not showing the user selection page. instead it takes the last logged in user.
    how to force it to show the user selection page every time.
    as i can see you are clearing cookies every time. can i do that in client too...

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

      I don't think it is possible at this point of time. By default, Google will reuse the session of the logged in user. In this forum stackoverflow.com/questions/37711665/forcing-a-user-to-choose-an-account-via-google-oauth2, it says there is an option to pass a prompt parameter. But, Cognito doesn't support the option of passing a prompt parameter.

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

    hi is it possilbe to know when.i use authorization_code Oauth flow type instead of Implicit grant?

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

      You can use authorization code flow. I was using implicit grant only for the purpose of demo. implicit grant should never be used for any application integration in production. It is ok to use for demo purpose or to learn how a particular feature works.

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

    could you please ensure to keep your mic closeby as we lost audio in some parts. otherwise great tutorial.

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

      Thanks for the feedback. I am constantly trying to improve the quality of the videos and will try my best.

  • @李晧暐
    @李晧暐 8 місяців тому

    What an awesome video! Thank you
    Would you mind to create a video to share with us about how to use aws cognito login with desktop application(ex: electron js or any other framework) ?

    • @securityinaction1018
      @securityinaction1018  8 місяців тому +1

      Thank you!!
      I need to check that. As long as desktop app can open some inline browser, I think same flow should work.
      Please like, subscribe & share!! Thanks in advance.

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

    super helpful

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

      Thank You!!
      Please like, subscribe & share!! Thanks in advance.

  • @whoooooooswhoooooo
    @whoooooooswhoooooo 2 роки тому

    hi, how to do this social login using golang ?

    • @securityinaction1018
      @securityinaction1018  2 роки тому

      Are you referring to a client app using golang?

    • @whoooooooswhoooooo
      @whoooooooswhoooooo 2 роки тому

      No. I mean how to store the data using golang.
      Example:
      I have react app that using google signin
      I login and send the data to my backend(go)
      Then how i store that data on user pool as external probider?

    • @securityinaction1018
      @securityinaction1018  2 роки тому

      You need to integrate your app with Cognito instead of Google. Cognito will handle the Google signin flow and store the user profile when a user logs in for the first time.

    • @whoooooooswhoooooo
      @whoooooooswhoooooo 2 роки тому

      By that you mean integrate with my react app directly right?

    • @securityinaction1018
      @securityinaction1018  2 роки тому

      Yes. Add Google as an Identity provider in Cognito as described in this video and integrate the react app with Cognito using OIDC

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

    terrible sound, the mouse clicks very loudly, periodically the volume decreases, as if the microphone is covered with something

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

      Thanks for the feedback. I agree on the mouse click and audio issues. I made some changes in the latest videos that I posted and I will try my best to improve the quality.

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

    Sorry, couldn't continue listening with your sound going out from time to time. Good content though.

  • @md.sadiqibnmasud4985
    @md.sadiqibnmasud4985 Рік тому

    Very poor sound quality!

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

    @securityinaction1018 could you please help me with android app integration solution

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

      I have not tried mobile app integration? But, it should be almost same as a web app integration. I think only the redirect_uri needs to be configured differently for a mobile app. This documentation might be helpful : docs.amplify.aws/lib/auth/getting-started/q/platform/android/#option-2-manually-call-the-authentication-apis