This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2018-05-19 12:05:08 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Oauth::TokensController < Doorkeeper::TokensController
|
|
|
|
def revoke
|
2022-04-30 15:51:32 -07:00
|
|
|
unsubscribe_for_token if token.present? && authorized? && token.accessible?
|
|
|
|
|
2018-05-19 12:05:08 -07:00
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def unsubscribe_for_token
|
|
|
|
Web::PushSubscription.where(access_token_id: token.id).delete_all
|
|
|
|
end
|
|
|
|
end
|