0

The current customer isn't authorized error appears

Appears on executing mutation in chrome graphQl tool https://chrome.google.com/webstore/detail/graphql-playground-for-ch/kjhjcgclphafojaeeickcokfbhlegecd

mutation {
  revokeCustomerToken {
    result
  }
}

any thoughts why this error appearing ?

1
  • any thoughts on this ?
    – devhs
    Mar 18, 2021 at 7:26

1 Answer 1

0

I believe this is about a missing authorization token in the request header. The documentation provides a pretty complete picture about how the token is generated and how it works.

Running the mutation in your example, without setting the authorization token first in the request header, fails because Magento doesn't know which token for which customer to revoke. You can also find the error explained on the revokeCustomerToken mutation documentation page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.