Delete webhooks for revoked OAuth app
Description
Currently there's no way to delete a setup webhook when the user revokes the OAuth app.
Proposal
- Automatically delete webhooks attached to an account when the OAuth app is revoked/deleted.
OR
- Send a
410 Gone
back to the server to delete the webhook, since the other side will receive an error when the credentials become invalid.
Links / references
Trello implements this beautiful way of handling webhooks deletion: https://developers.trello.com/apis/webhooks (See Deleting webhooks section)
Documentation blurb
- Why should someone use it; what's the underlying problem. The problem is that the system integrating through webhooks will get bloated with requests if a handful of users revoke their OAuth apps and they can't be deleted in any other way than using OAuth credentials.
- What is the solution.
- GitLab's system should automatically delete webhooks attached to an account when the OAuth app is revoked/deleted.
OR
- Send a
410 Gone
back to the server to delete the webhook, since the other side will receive an error when the credentials become invalid.
- How does someone use this
When trying to respond back to GitLab, but we receive an unauthorized/unauthenticated error, we rescue from it and delete the webhook ( if the second solution is implemented, otherwise GitLab will take care of this