Disable a user from cognito

Viewed 1135

It is possible to deactivate the account with only the token or user identifiers without the need to use the admin functions "AdminDisableUser"?

1 Answers

There doesn't seem to be a way to disable a user without developer credentials. This is the list of API operations available for Cognito User Pools, but searching for "disable" results in only AdminDisableUser.

There is also this issue on Github where someone asked how to delete or disable a user. A solution was provided to demonstrate how a user can delete themself, but the provided solution for disabling a user was to use Admin Actions. Admin Actions doesn't seem to allow you to limit a user to only disable themself though.

It looks like you'll have to set up a custom Lambda function or backend API to enable users to disable themselves.

Related