-
Notifications
You must be signed in to change notification settings - Fork 33
Initial cognito trigger support #27
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
Conversation
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
thanks @mattmassicotte |
@swift-server-bot test this please |
I don't have much experience with Cognito Lambda Trigger events but code looks fine |
When I first noticed the failure, it looked like some formatting problems. I'll try to get swift-format working so I can fix this all up. Sorry for keeping it pending for so long. |
Ok, changes pushed. Just waiting for CI to confirm that I fixed everything up. |
@tomerd is it normal for these checks to take so long? |
@swift-server-bot test this please |
@mattmassicotte only maintainers can trigger them for security reasons |
Support for one Cognito Lambda Trigger (
PreSignUp_SignUp
), with infrastructure to support all 20 others.Motivation:
I've been playing around with implementing WebAuthn (passkeys) using only Swift. It turned out to be complex, because Cognito doesn't support it yet, and requires the use of 3/4 lambda triggers.
Modifications:
Added a basic Cognito trigger enum that should be able to model all 21 lambda trigger types. Made some tests for the single trigger I've currently actually used.
Result:
Cognito triggers are a little funny in that they all have a common shape, but differ in some ways depending on the type. And, because there are so many (21 as of right now), I didn't want to create a bunch of duplicate structs. So, I opted for a enum that stores the trigger-specific data.
I think this change is potentially useful, even though it is far from a complete implementation. I figured I'd propose it in PR form just to see what you all think. Happy to entertain suggestions!