jagregory / cognito-local

Local emulator for Amazon Cognito
MIT License
289 stars 74 forks source link

groupConfiguration request for the PreTokenGeneration Lambda should be a list, not a dict #287

Open seanfdnn opened 2 years ago

seanfdnn commented 2 years ago

As per the pre-token generation data structure on the AWS docs: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html

The JSON request to the pre-token generation token should have groupConfiguration as a list, but cognito-local currently has it implemented as a dictionary.

https://github.com/jagregory/cognito-local/blob/d04506e3623889fb96ffbb413cd97be627570aee/src/services/triggers/preTokenGeneration.ts#L35

seanfdnn commented 2 years ago

Upon investigation, it appears as if the AWS-provided types match the current cognito-local implementation and it's actually the AWS documentation that is incorrect? Does anyone have any knowledge to confirm which is correct?

image