Shopify / rbi-central

MIT License
55 stars 36 forks source link

Missing `OmniauthCallbacksController` for Devise #248

Closed marcelopazzo closed 3 months ago

marcelopazzo commented 3 months ago

Problem

The Devise::OmniauthCallbacksController is missing in the RBI provided here.

app/controllers/users/omniauth_callbacks_controller.rb:11: Unable to resolve constant OmniauthCallbacksController https://srb.help/5002
    11 |  class OmniauthCallbacksController < Devise::OmniauthCallbacksController
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Context

Solution

This is the missing bit:

# @shim: Devise controllers are loaded by rails
class Devise::OmniauthCallbacksController < DeviseController
  # GET|POST /resource/auth/provider
  sig { returns(T.untyped) }
  def passthru; end

  # GET|POST /resource/auth/provider/callback
  sig { returns(T.untyped) }
  def failure; end

  sig { returns(String) }
  def failed_strategy; end

  sig { returns(String) }
  def failure_message; end

  sig { params(scope: String).returns(String) }
  def after_omniauth_failure_path_for(scope); end

  sig { returns(String) }
  def translation_scope; end
end