You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/app/lib/oauth_pre_authorization_ext...

14 lines
332 B
Ruby

# frozen_string_literal: true
module OauthPreAuthorizationExtension
extend ActiveSupport::Concern
included do
validate :code_challenge_method_s256, error: Doorkeeper::Errors::InvalidCodeChallengeMethod
end
def validate_code_challenge_method_s256
code_challenge.blank? || code_challenge_method == 'S256'
end
end