Logan Keenan
Logan Keenan

Reputation: 36

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!

Upvotes: 0

Views: 198

Answers (1)

Logan Keenan
Logan Keenan

Reputation: 36

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

Upvotes: 1

Related Questions