The CognitoPreTokenGenerationV2Event does not adhere to the AWS documentation #1798
Labels
bug
This issue is a bug.
module/lambda-client-lib
p2
This is a standard priority issue
queued
s
Effort estimation: small
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.
The text was updated successfully, but these errors were encountered: