GraphQL API subscribe() call returns Unauthorized exception with JWT token

0

Hello, customer is building an app that uses Cognito User Pools federated with on-prem Central Authentication Service (CAS) via SAML. This provides JWT tokens. With this token they are calling GraphQL API from AppSync implemented via Amplify with DynamoDB. They are using "aws-amplify" library for this. There are no errors when the call is a query or mutations. For example: API.graphql(graphqlOperation(<some query here>, {}, <token>)).then( (res) => (....) But there is an exception if the call is of type "subscribe", example: API.graphql(graphqlOperation(<some subscription name here>, {}, <token>)).subscribe({ next: (data) => (....) message: "Connection failed: UnauthorizedException"

I can provide more details or arrange a customer call if anyone is eager to help out with this issue.

  • How is the graphql schema defined and how has authorization been setup?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠