module Doorkeeper::Orm::ActiveRecord::Mixins::Application
def plaintext_secret
while hashing strategies do not, so you cannot rely on this value
Some strategies allow restoring stored secrets (e.g. symmetric encryption)
The stored refresh_token may be mapped and not available in cleartext.
We keep a volatile copy of the raw secret for initial communication
def plaintext_secret if secret_strategy.allows_restoring_secrets? secret_strategy.restore_secret(self, :secret) else @raw_secret end end