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 Answer
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions