getting error on jwt.io when trying to get access_token

50 Views Asked by At

i'm configuring Oauth2 between google photosapi and aws cognito. when trying to get access_token in jwt.io from client id and client secret, i'm keep getting the following error on the jwt.io url when pressing on the view hosted UI -> https://jwt.io/#error_description=username+attribute+mapping+required&error=invalid_request all fields are mapped correctly so i dont undestand what is the malfunction here. enter image description here

does anyone have any idea how to solve it?

thanks

1

There are 1 best solutions below

0
Y.D On

i solve the issue by writing correctly the scope. Hosted UI enter image description here

should be matched in the scope under identity provider: Google enter image description here

my question now is -> if i got access_token and i'm using it as header ->

{
            "Authorization": "Bearer ey...XMQ"

}

why i'm keep getting this error message ->

"error": {
"code": 401,
"message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}