awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
921 stars 266 forks source link

fix(aws-appsync-subscription-link): graphql header refactor to fix IA… #671

Closed david-mcafee closed 3 years ago

david-mcafee commented 3 years ago

fix(aws-appsync-subscription-link): graphql header refactor to fix IAM-based auth

Issue #, if available:

619

Description of changes: IAM-based auth is currently broken as we are passing the wrong headers to the IAM header handler. This PR updates the subscription link so that we no longer pass those headers to the IAM header handler, but maintain the headers for all other auth types in the event that the customer is supplying custom headers.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

david-mcafee commented 3 years ago

This looks good @david-mcafee !! 🥇

Let me know when you test on the different Auth modes. We can merge it after that!

Thanks @elorzafe! Building additional sample apps now. 😄

david-mcafee commented 3 years ago

All manual checks have passed.

Manual Testing Checklist:

[ X ] node-apollo-V3-API-Key

[ X ] node-apollo-V3-Cognito

[ X ] node-apollo-V3-IAM

[ X ] react-apollo-V3-API-Key

[ X ] react-apollo-V3-Cognito

[ X ] react-apollo-V3-IAM

[ X ] react-native-apollo-V3-API-Key

[ X ] react-native-apollo-V3-Cognito

[ X ] react-native-apollo-V3-IAM