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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南