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

Missing field enableSMSMFA on struct events.CognitoEventUserPoolsMigrateUserResponse #553

Open
andresherreram opened this issue Mar 8, 2024 · 0 comments
Labels
enhancement type/events issue or feature request related to the events package

Comments

@andresherreram
Copy link

andresherreram commented Mar 8, 2024

Is your feature request related to a problem? Please describe.
According to cognito migrate user lambda trigger documentation the event struct could use a field called enableSMSMFA to allow force the migrated user to trigger the SMSMFA step.

That field is not present in the current events package.

Describe the solution you'd like
On file events/cognito.go:

// CognitoEventUserPoolsMigrateUserResponse contains the response portion of a MigrateUser event
type CognitoEventUserPoolsMigrateUserResponse struct {
	UserAttributes         map[string]string `json:"userAttributes"`
	FinalUserStatus        string            `json:"finalUserStatus"`
	MessageAction          string            `json:"messageAction"`
	DesiredDeliveryMediums []string          `json:"desiredDeliveryMediums"`
	ForceAliasCreation     bool              `json:"forceAliasCreation"`
	EnableSMSMFA           bool              `json:"enableSMSMFA"`
}

Describe alternatives you've considered
For now I'm trying to create a local struct that inlude the original plus that field:

type	UserMigrationEventResponse struct {
	events.CognitoEventUserPoolsMigrateUserResponse
	EnableSMSMFA bool `json:"enableSMSMFA"`
}

type UserMigrateAuthEvent struct {
	events.CognitoEventUserPoolsHeader
	events.CognitoEventUserPoolsMigrateUserRequest `json:"request"`
	UserMigrationEventResponse                     `json:"response"`
}

Additional context
Documentation of the event: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html#cognito-user-pools-lambda-trigger-syntax-user-migration

@bmoffatt bmoffatt added enhancement type/events issue or feature request related to the events package labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type/events issue or feature request related to the events package
Projects
None yet
Development

No branches or pull requests

2 participants