Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@aws-amplify/core): Use identityPoolRegion param correctly #10709

Merged
merged 7 commits into from Dec 2, 2022

Conversation

elorzafe
Copy link
Contributor

@elorzafe elorzafe commented Nov 24, 2022

Description of changes

identityPoolRegion param wasn't use correctly when different regions where used.

Amplify.configure({
    Auth: {
        userPoolId: 'us-east-1_xxxxxxxx',
        userPoolWebClientId: 'xxxxxxxx',
        identityPoolId: 'us-west-2:sssssxxxxxxxxd',
        region: 'us-east-1',
        identityPoolRegion: 'us-west-2'
    }
});

Issue #, if available

fixes: #6462

Description of how you validated changes

Integ test PR https://github.com/aws-amplify/amplify-js-samples-staging/pull/482

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2022

Codecov Report

Merging #10709 (240e865) into main (2989480) will increase coverage by 0.43%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #10709      +/-   ##
==========================================
+ Coverage   85.71%   86.14%   +0.43%     
==========================================
  Files         196      196              
  Lines       18335    18337       +2     
  Branches     3900     3902       +2     
==========================================
+ Hits        15715    15797      +82     
+ Misses       2544     2465      -79     
+ Partials       76       75       -1     
Impacted Files Coverage Δ
packages/auth/src/Auth.ts 87.13% <ø> (-0.02%) ⬇️
packages/core/src/Credentials.ts 67.70% <100.00%> (+28.41%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@elorzafe elorzafe force-pushed the fix/auth-identity-pool-different-region branch from ca6669d to 75d849f Compare November 26, 2022 00:24
@elorzafe elorzafe marked this pull request as ready for review December 1, 2022 20:20
@elorzafe elorzafe requested review from a team as code owners December 1, 2022 20:20
jimblanc
jimblanc previously approved these changes Dec 1, 2022
Copy link
Contributor

@jimblanc jimblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

helgabalashova
helgabalashova previously approved these changes Dec 1, 2022
@elorzafe elorzafe dismissed stale reviews from helgabalashova and jimblanc via 9c59c2d December 2, 2022 00:01
@elorzafe elorzafe requested a review from a team as a code owner December 2, 2022 00:01
jimblanc
jimblanc previously approved these changes Dec 2, 2022
};
}
if (params instanceof GetCredentialsForIdentityCommand) {
console.log('GetCredentialsForIdentityCommand', params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need that console.log?

identity_id: '123',
});

console.log('YYYY');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this one as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@elorzafe elorzafe merged commit b4d2769 into main Dec 2, 2022
@jimblanc jimblanc deleted the fix/auth-identity-pool-different-region branch December 2, 2022 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credentials._setCredentialsFromSession generates invalid provider name
4 participants