Cognito Authorization using ASP.Net Core

0

I'm trying to get my ASP.Net Core Web App to authenticate/authorize using AWS Cognito. I'm using the following example as a guideline: https://github.com/aws-samples/aws-netcore-aspnetmvc-amazon-cognito-authentication-authorization-samples

So far, I haven't been able to get the sample working and I've noticed at least one other person who has a similar issue redeeming the token.

I'm using Visual Studio 2022 and have migrated to the latest version of .Net.

When I attempt to login, I'm getting the following, any idea what might be wrong?

AWSAuthError

Thank you

  • I duplicated the sample using a new ASP.Net Core MVC Web App using .Net 7.0, made the necessary changes to migrate from Program.cs + Startup.cs to just the Program.cs. I'm getting the same error.

    I can zip up the solution and send if needed.

1개 답변
0

Hi,

Please take a look at our documentation per endpoint. For example for the Token endpoint request [ https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html ] the error means:

Client authentication failed. For example, when the client includes client_id and client_secret in the authorization header, but there's no such client with that client_id and client_secret.

There is a high chance you did not provide the Authorization header for a confidential client in the form of Basic <Base64 format of 'client_id:client_secret'

Jeff

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인