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

The CognitoPreTokenGenerationV2Event does not adhere to the AWS documentation #1798

Closed
ashishdhingra opened this issue Aug 26, 2024 Discussed in #1792 · 4 comments
Closed
Assignees
Labels
bug This issue is a bug. module/lambda-client-lib p2 This is a standard priority issue queued s Effort estimation: small

Comments

@ashishdhingra
Copy link
Contributor

Discussed in #1792

Originally posted by DizzyDeveloper August 19, 2024
According to the the AWS documentation for the Pre token generation Lambda trigger the claims response of the CognitoPreTokenGenerationV2Event should be able to accept any one of [String, Number, Boolean, Array of strings, numbers, booleans, or a combination of any of these, JSON]. However, at the moment it just accepts a string map?
Is there any intention implement the documented specs?

Note, I did a hack around locally by cloning the CognitoPreTokenGenerationV2Event and updating the signature of ClaimsToAddOrOverride property in the AccessTokenGeneration class from:

public Dictionary<string, string> ClaimsToAddOrOverride { get; set; } = new ();
to
public Dictionary<string, object> ClaimsToAddOrOverride { get; set; } = new ();

and that works. Can something similar be done as part of this repo.

@ashishdhingra ashishdhingra added bug This issue is a bug. module/lambda-client-lib p2 This is a standard priority issue s Effort estimation: small labels Aug 26, 2024
@bhoradc bhoradc added the queued label Aug 26, 2024
@ashishdhingra
Copy link
Contributor Author

@DizzyDeveloper Issue has been queued in our internal backlog and should be prioritized soon.

@ashishdhingra ashishdhingra self-assigned this Aug 28, 2024
@ashishdhingra
Copy link
Contributor Author

ashishdhingra commented Aug 28, 2024

Looks like Java version and Go version have the same issue.

@ashishdhingra
Copy link
Contributor Author

Changes released in Amazon.Lambda.CognitoEvents 4.0.0. Kindly note that this is a breaking change and has been explicitly called out in Changelog.

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/lambda-client-lib p2 This is a standard priority issue queued s Effort estimation: small
Projects
None yet
Development

No branches or pull requests

4 participants
@ashishdhingra @bhoradc and others