-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(auth): Add identityPoolEndpoint config to allow using a custom CognitoIdentity endpoint #13552
base: main
Are you sure you want to change the base?
Conversation
3016c58
to
83b58dc
Compare
83b58dc
to
aca9ec0
Compare
aca9ec0
to
2dfebd9
Compare
Hi folks @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF, just wanted to briefly follow up on this - any feedback on this PR? Please let me know if you have any suggestion regarding implementation, testing, etc. Happy to iterate on the implementation, but would be awesome to get this functionality in, to allow more flexible configuration and easier local testing. Looking forward to getting your feedback! 🙌 Thank you |
This PR is really needed for anyone who wants to use AWS amplify js with Localstack. @whummer Are you able to fix the branch to be up to date with the base branch? @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF The changes are not substantial, but creates the exact fix needed that is stopping anyone using this with LocalStack. It seems off that a custom endpoint can be set for everything except the identity pool. This PR is a game changer when it comes to using the awesomeness of AWS Amplify and the amazingness of LocalStack. |
hi @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF any updates on this PR? |
Thanks for the feedback and chiming in here @Neuroforge @dmytzo - updated the branch to be up to date with the base branch. 👍 Hoping to get some feedback from the maintainers soon 🙌 |
Hi all! Thank you very much for the contribution from LocalStack! My apologies for the delayed attention. We are currently testing the code change. We noticed that the existing user pool endpoint resolver implementation (which the code change in this PR referred to) does not work on the server side of a SSR-enabled app. We are exploring a solution to fix it and will suggest corresponding changes here. Thanks again for the contribution, and your patience! |
Hi @HuiSF , thanks for getting back to us and providing some context. Just wanted to briefly check in - is there anything we can do to help here? I understand that you are running some more tests for SSR-enabled apps. Could it be an option to get these changes in now, and then solve the SSR issue holistically for I'm just thinking of ways to unblock us here - our users would love to see this feature and test their Amplify apps with LocalStack! 🙌 Thanks a bunch for your help - please let us know how we can help! |
I'm willing to give some time to help this if there's anything i can do to unblock this. |
Hi @whummer I opened the PR for fixing the In the meantime, I hope to learn more about the workflows of using Amplify with LocalStack so we can review the details internally. Could you clarify the following?
|
Hi all, the fix PR around the custom user pool endpoint has merged. We've reviewed this proposal internally and we can proceed. Do you want to keep working on this PR with the following?
If you are feeling it would be overwhelming, please let us know. We are happy to update this PR and get it merged. Thanks again for your patience. |
Hi @HuiSF, thanks so much for the update, this is great progress! 🚀 If we could get some help from you to get this PR over the line, that would actually be fantastic 🙌 - please feel free to push to this branch directly (should technically work, but please let us know if there are permission issues, happy to invite you to the forked repo). Thanks a ton for your help on this! 🙏 |
@whummer do you think we can get an localstack docs/article/example on how to set this up properly? |
Any news on this one? |
72b4143
to
b3258ab
Compare
b3258ab
to
022f28d
Compare
Hello, any update on this? |
What's happening with this? Last update was in September. |
Hi all, sorry about the delay. I've made a tag ( npm install aws-amplify@local-stack |
Thanks @HuiSF , appreciate the update! 🚀 We'll look into this, and report back here asap. Just to confirm - is the required logic already contained in the |
Hi @whummer the tag release for testing is based on this PR, we will get this PR merged if all the tests are going well for a formal release. Thanks for your patience! |
Was able to perform a login to LocalStack with AmplifyJS V6 by setting DISABLE_CORS_CHECKS=1 when starting LocalStack. So, i've had a crack at this... First step was to upgrade to AmplifyJs V6. So it's very likely that my config is wrong. But i have my cdk stack deployed to LocalStack and the services appear to be running.
|
Looks like we have another one that could make this tricky. S3 has a similar issue. |
Hi @whummer what's the possible urls that LocalStack can generate? Is |
91e03b0
to
d58d3b4
Compare
d58d3b4
to
f991f68
Compare
Any updates on getting this merged? |
Add
identityPoolEndpoint
config to allow using a customCognitoIdentity
endpoint.Motivation
We already have the ability to specify a custom endpoint for
CognitoIdentityProvider
, which was added by @jimblanc in this PR: #12236 (and then later renamed touserPoolEndpoint
in this PR)In addition to specifying a custom endpoint for user pools (
CognitoIdentityProvider
), it would be awesome if we can do the same thing for identity pools (CognitoIdentity
) as well.Description of changes
This PR introduces a
userPoolEndpoint
field for the Amplify configuration. The field is optional, and if specified, then theendpointResolver
incognitoIdentity/base.ts
uses its value as theendpoint
for theCognitoIdentity
SDK client.The implementation of the new
endpointResolver
function is analogous to the existing function forCognitoIdentityProvider
here:amplify-js/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts
Lines 32 to 42 in b6de5f9
Description of how you validated changes
Local testing of various Amplify sample apps (including the Lambda Powertools workshop repo /cc @heitorlessa ).
Checklist
yarn test
passesyarn docs
, but that seems to have generated lots of changes that are unrelated to this PR. 🤔Checklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.