Skip to content

Commit

Permalink
Fix AWS_IAM credentials fetching (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
manueliglesias authored Feb 8, 2018
1 parent fc73e2d commit 255b8ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/aws-appsync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### vNext
- Fix AWS_IAM credentials fetching [PR#XX](https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/XX)

### 1.0.8
- Handle missing optimisticResponse [PR#34](https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/34)

Expand Down
4 changes: 2 additions & 2 deletions packages/aws-appsync/src/link/auth-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const iamBasedAuth = async ({ credentials, region, url }, operation, forward) =>

let creds = typeof credentials === 'function' ? credentials.call() : credentials;

if (typeof creds.getPromise == 'function') {
creds = await creds.getPromise();
if (typeof creds.getPromise === 'function') {
await creds.getPromise();
}

const { accessKeyId, secretAccessKey, sessionToken } = await creds;
Expand Down

0 comments on commit 255b8ee

Please sign in to comment.