module Doorkeeper::AccessGrantMixin

def uses_pkce?

Never uses PKCE if PKCE migrations were not generated
def uses_pkce?
  self.class.pkce_supported? && code_challenge.present?
end