Getting Access Token from Amazon Cognito using Postman | Authorization Code Grant and Implicit Grant

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มี.ค. 2023
  • In this video, I will show you, how to retrieve Access Token and ID Token from Amazon Cognito using Postman with authorization code flow as well as implicit grant flow.
    Notion link - www.notion.so/Getting-Access-...
    Additional Watch
    📺Building Serverless .NET APIs using AWS Lambda, Amazon API Gateway, and Amazon Cognito • Building Serverless .N...
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Thanks man, I have been trying to understand this since morning and your video made it so simple. You rock!

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

    Very usefull Video, thank for shared it!

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

    Good video, thanks!

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

    Can I ask if can I use this to connect on google api services? google calendar api to be specific btw I used nextjs as framework + aws as backend I also used google social login.

  • @user-og7fd6wb7w
    @user-og7fd6wb7w 4 หลายเดือนก่อน

    You are the man

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

    How to get the BearerToken / Access Token without sign-in step? for example to be used in Test automation (or pipeline jobs running on CI/CD)

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

      In that case, you need to use Client Credentials flow.

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

    Thanks for the video. I ran into this trying to see if there is a way to automate the entire process. Do you know any tutorials that show if this is possible to do all of this programmatically without any user interaction?

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

      Yes, this is a two-step process: first, create a Cognito user pool, and then configure Postman to generate bearer tokens.
      To begin, you can utilise IaC scripts such as CDK, Terraform, CloudFormation, and others to automate the formation of a Cognito user pool.
      Second, for the Postman section, you'll have to initially configure it manually, and when doing so, try to utilize variables rather than hard-coded values whenever possible. The collection and variables can then be exported to JSON files. You can later utilize those files to easily configure the environment.
      Hope this should help!

  • @KarimFayed-oy5oo
    @KarimFayed-oy5oo 3 หลายเดือนก่อน

    Very helpful video but I fail to understand what should i do if I don't want to authorize using the UI. I just created a user and I simply want to retrieve the access token in postman without using the UI

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

      If you are not using Hosted UI, then you can use Cognito's Authentication Flows instead of OAuth flow. Answers on this page can help you. repost.aws/questions/QUW-FCbWmbRSSRQnfgQEdefg/how-do-i-obtain-an-id-token-from-cognito-without-hosted-ui

  • @user-bj4tb2nv3v
    @user-bj4tb2nv3v 5 หลายเดือนก่อน

    How Do I get the token from my real app without postman, using authorize code grant?

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

      Depends on what framework you’re using for the web app.

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

    First i want to access token to get into cognito user pool ther I want to get cognito token and thorugh which I want to use services like S3 bucket, How can I do it?

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

      For that you have to create a Cognito Identity Pool, and then have to call assume-role-with-web-identity API method. Refer to this detailed post - repost.aws/knowledge-center/cognito-identity-pool-grant-user-access

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

    Does it give new access token every time or the same ?

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

      It should give a new one every time I believe. But you can verify.