Skip to content

Feature request: Add Cognito trigger schemas #3675

Closed
@jkahn117

Description

@jkahn117

Use case

To continue implementation of parser, add schemas for Cognito Lambda triggers. Lambda triggers customize the flow of user pool sign-up, authentication, etc. Details are in docs.

Solution/User Experience

Cognito schemas would be similar to existing schemas in the parser middleware. Many of the schemas would be similar / same.

For example, a basic event schema for the pre-signup trigger:

z.object({
  version: z.string(),
  region: z.string(),
  userPoolId: z.string(),
  userName: z.string(),
  callerContext: z.object({
    awsSdkVersion: z.string(),
    clientId: z.string()
  }),
  triggerSource: z.string(),
  request: z.object({
    userAttributes: z.record(z.string(), z.string()),
    validationData: z.record(z.string(), z.string()).nullable().optional(),
    userNotFound: z.boolean().optional()
  }),
  response: z.object({
    autoConfirmUser: z.boolean().optional(),
    autoVerifyEmail: z.boolean().optional(),
    autoVerifyPhone: z.boolean().optional()
  }).optional()
});

Alternative solutions

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilitygood-first-issueSomething that is suitable for those who want to start contributingparserThis item relates to the Parser Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions