-
Notifications
You must be signed in to change notification settings - Fork 4k
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(cognito): implement user pool and user pool client constructs #1615
Conversation
This commit adds initial support for Cognito User Pools. `UserPool` allows selecting the type of sign-in (username vs email, etc) with options consistent with what is presented in the console. `UserPool` also supports setting alias attributes & auto-verified attributes, as well as setting Lambda function triggers. A basic implementation of app clients is implemented in `UserPoolClient`.
…lem/cognito-user-pool
Some formatting & safe traversal changes (trivial). Replacing `lambda.Function` with `lambda.IFunction`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty neat! Thanks for spending the effort!
You'd want to add IUserPool
and support the import
mechanism, so people can refer to user pools that were defined out-of-app. In that line of thought, you'll want to use the I<resource>
interfaces (like lambda.IFunction
) whenever possible, to be friendlier to re-use of existing resources. I have updated the references to lambda.Function
for you though 😄
Also, it's best to surface all underlying resource attributes through the L2 construct (noted some missing attributes in the detail).
need to write more tests and confirm the build is still successful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very impressive and high quality work. Thanks for this!
Would be nice to add a bit of sugar (on top of the existing API) to improve usability if possible.
Copy: @sam-goodwin
this currently replaces the ability to pass lambdas in props; will fix also still need to write tests to meet coverage threshold
updated docs & added missing tests tests pass at 85% coverage
@RomainMuller @eladb I believe all the requested changes have been made. Let me know if there's anything I missed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thanks for the hard work!
Overview
This PR adds initial support for Cognito User Pools.
UserPool
allows selecting the type of sign-in (username vs email, etc) with options consistent with what is presented in the console.UserPool
also supports setting alias attributes & auto-verified attributes,as well as setting Lambda function triggers.
A basic implementation for app clients is implemented in
UserPoolClient
.This closes #1576
Todo
Pull Request Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.