title: Missing required parameter: scope. after doorkeeper gem upgrade from 5.1.0 to 5.2.1
body: <p>After a gem upgrade of doorkeeper from 5.1.0 to 5.2.1 on the Rails (5.2.3) application that provides authorization, the login for the application requesting authorization does not work anymore. The page on the authorizing application states <code>Missing required parameter: scope.</code> although we do not use scopes.</p>
  
  <p>There are some lines about scopes in the migration notes but they don't speak to me. <a href="https://github.com/doorkeeper-gem/doorkeeper/wiki/Migration-from-old-versions#database-changes" rel="nofollow noreferrer">https://github.com/doorkeeper-gem/doorkeeper/wiki/Migration-from-old-versions#database-changes</a></p>
  
  <p>I understood that I had to create a migration like this one but the issue persisted:</p>
  
  <pre><code># frozen_string_literal: true
  
  class ChangeScopesOnOAuthAccessGrants &lt; ActiveRecord::Migration[5.2]
    def up
      change_column_default :oauth_access_grants, :scopes, from: nil, to: ''
      change_column_null :oauth_access_grants, :scopes, false
    end
  
    def down
      change_column_default :oauth_access_grants, :scopes, from: '', to: nil
      change_column_null :oauth_access_grants, :scopes, true
    end
  end
  </code></pre>
  
  <p>The configuration <code>doorkeeper.rb</code> on the authorizing application is as simple as:</p>
  
  <pre><code>Doorkeeper.configure do
    orm :active_record
  
    resource_owner_authenticator do
      current_admin_user || redirect_to(new_admin_user_session_path(params.permit(:client_id, :redirect_uri, :response_type, :state)))
    end
  
    admin_authenticator do
      current_admin_user || redirect_to(new_admin_user_session_path)
    end
  
    access_token_expires_in 24.hours
  end
  </code></pre>
  
  <p>I had a deeper look into the response before and after running the migrations. Using <code>binding.pry</code>in the Doorkeeper module's <code>AuthorizationsController#new</code> (inheriting from <code>Doorkeeper::ApplicationController</code>), I can confirm that the instance of <code>Doorkeeper::OAuth::PreAuthorization</code> returns <code>nil</code> for the attribute <code>scope</code> but not for <code>scopes</code>.</p>
  
  <p>After invoking <code>pre_auth.authorizable?</code>, I get this objects and these values:</p>
  
  <pre><code>#&lt;Doorkeeper::OAuth::PreAuthorization:0x00007fad33f25390
   @client=
    #&lt;Doorkeeper::OAuth::Client:0x00007fad364b22e8
     @application=
      #&lt;Doorkeeper::Application:0x00007fad364b26d0
       id: 2,
       name: "...",
       uid: "...",
       secret: "..",
       redirect_uri:
        "http://localhost:3001/users/auth/doorkeeper/callback",
       scopes: "",
       created_at: Tue, 24 Oct 2017 11:56:13 CEST +02:00,
       updated_at: Thu, 03 Oct 2019 18:53:35 CEST +02:00,
       confidential: true&gt;&gt;,
   @client_id="...",
   @code_challenge=nil,
   @code_challenge_method=nil,
   @error=:invalid_request,
   @missing_param=:scope,
   @redirect_uri="http://localhost:3001/users/auth/doorkeeper/callback",
   @response_type="code",
   @scope=nil,
   @server=
    #&lt;Doorkeeper::Config:0x00007fad33b72180
     @access_token_expires_in=24 hours,
     @api_only=false,
     @application_secret_strategy=Doorkeeper::SecretStoring::???,
     @authenticate_admin=#&lt;Proc:0x00007fad33b71d20@/Users/.../config/initializers/doorkeeper.rb:11&gt;,
     @authenticate_resource_owner=#&lt;Proc:0x00007fad33b71eb0@/Users/.../config/initializers/doorkeeper.rb:6&gt;,
     @default_scopes=#&lt;Doorkeeper::OAuth::Scopes:0x00007fad364cb7c0 @scopes=[]&gt;,
     @orm=:active_record,
     @token_secret_strategy=Doorkeeper::SecretStoring::???&gt;,
   @state="..."&gt;
  </code></pre>
  
  <p>I currently don't have any leads for problem solving. Thanks for your hints!</p>