title: how to authenticate user after success-full registration using doorkeeper gem
body: <p>I am working on project that is using <code>doorkeeper</code> gem.
  I have setup everything  successfully.
  Now what i want to do is to logged the user in after successful registration.I am using <code>sorcery</code> gem for authentication .</p>
  
  <p>My registration process is working fine and i am getting <code>access_token</code> from doorkeeper.</p>
  
  <p>But i cant't logging in the user with <code>doorkeeper</code> gem. </p>
  
  <p>Here is my <code>users_controller.rb</code></p>
  
  <pre><code> def create
    profile = Profile.new(params.permit(:birth_date, :phone_number))
    user = profile.build_user(params.permit(:first_name, :last_name, :email, :password))
  
    if profile.save
      @access_token = Doorkeeper::AccessToken.create!(
        resource_owner_id: user.id,
        application_id: doorkeeper_token.application_id,
        use_refresh_token: Doorkeeper.configuration.refresh_token_enabled?,
        expires_in: Doorkeeper.configuration.access_token_expires_in
      )
      #This line is for authentication provided by sorcery gem
      @user = User.authenticate( params[:email], params[:password])
    else
      error!(:unprocessable_entity, metadata: { details: profile.errors })
    end
  end
  </code></pre>
  
  <p>I have tried using doorkeeper provided <code>resource_owner_from_credentials</code> method at my users_controller.rb for login but still i failed like below:</p>
  
  <pre><code>Doorkeeper.resource_owner_from_credentials do
    User.authenticate(params[:email], params[:password])
  end
  </code></pre>
  
  <p>Can any tell me how to login the user after successful registration with doorkeeper and sorcery gem.</p>
  
  <p>thank you very much.</p>