Getting error message error_description=invalid_scope, when trying to authenticate via amazon cognito

I am new to aws and I am learning it. I am using AWS cognito to authenticate login to my application. But I am getting the following message in the URL:

http://localhost:8080/hotel/#error_description=invalid_scope&state=glEBNLLJrVTiLb0NSTO9Q35IYNrwpg9Z&error=invalid_request

I searched it on google but got no help. So, I am stuck with this problem. Any Idea?

>Solution :

Verify that the TokenScopesArray passed to the CognitoAuth method of amazon-cognito-auth.js file, matches with OpenID Connect scopes of Hosted UI of the User Pool that you might have created.

Leave a Reply