ruby-on-railsrubydoorkeeper

Doorkeeper token revoke callback


I'd like to invoke some code that requires the request object and the user when a token is revoked. It appears that Doorkeeper does not have the configuration to hook into the token revocation process. Perhaps, there's a better way to achieve this.

Thank You!


Solution

  • I ended up figuring this out. The code below will remove all the tokens for a particular resource owner.

    Doorkeeper::AccessToken.where(resource_owner_id: "some-id").delete_all