Should API Key plugin hook removeUser?

Using the apikey plugin, if I try to remove a user with the removeUser endpoint, it fails if the user has an active API key (foreign key constraint failed). Is that expected? Do I need to manually delete the API key myself in a hook or something else first?
3 Replies
Ping
Ping2mo ago
Hey this looks like a bug
Ping
Ping2mo ago
GitHub
fix(api-key): Cascade api keys on user deletion by ping-maxwell · ...
When a user is about to be deleted, you run into an SQL error saying that the user has a foreign key relation to an API key, thus preventing the user from being deleted. This PR adds an onDelete e...
Harvey
HarveyOP2mo ago
Thanks @Max

Did you find this page helpful?