cross20 / graphql-hello-world

MIT License
0 stars 0 forks source link

Code: "unauthenticated" when Updating Account #1

Open cross20 opened 3 years ago

cross20 commented 3 years ago

Providing the JWT authentication token in the header of an HTTP request does not authorize requests.

image

mutation updateAccount {
  updateAccount(firstName: "Adminnnn") {
    success
    errors
  }
}
cross20 commented 3 years ago

This is what comes back when sending the HTPP request in Postman. The JWT token comes from the token_auth mutation.

{
    "data": {
        "updateAccount": {
            "success": false,
            "errors": {
                "nonFieldErrors": [
                    {
                        "message": "Unauthenticated.",
                        "code": "unauthenticated"
                    }
                ]
            }
        }
    }
}