I have Devise authentication installed with no problems. Now I'm trying to add an option to log in with Facebook, using Omniauth-facebook.

I followed the instructions in [this guide](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview), but I'm getting errors about missing "Passthru" documentation, when visiting the url `localhost:3000/auth/facebook`.

Here's the first error I got: 

```
Unknown action
The action 'passthru' could not be found for RegistrationsController

```

I tried a bandaid fix by just adding an empty "passthru" action to my controller:

```
def passthru
end

```

And that resolved that error, but I got a different one in return:

```
Template is missing
Missing template registrations/passthru, devise/registrations/passthru, devise/passthru, application/passthru with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "/home/user/project/app/views" * "/home/user/.rvm/gems/ruby-2.0.0-p648@railstutorial_rails_4_0/gems/devise-3.5.2/app/views"

```

I tried creating a "passthru.html.erb" in the stated folders, but that error remained. In any case, I think these errors are emblematic of a deeper problem.

Has anyone else run into this problem? All I could find on it was [this SO question](https://stackoverflow.com/questions/17513829/devise-omniauth-call-action-passthru-on-login-facebook), but none of the answers were helpful.

---

**My code so far:**
-------------------

**Gemfile**

```
gem 'devise'
gem 'omniauth-facebook'
gem 'omniauth'

```

**routes.rb**

devise\_for :members, controllers: { registrations: 'registrations', `omniauth_callbacks: 'registrations' }`

**member.rb**

```
  devise :database_authenticatable, :registerable,
         :omniauthable, :omniauth_providers => [:facebook]

  def self.from_omniauth(auth)
    where(provider: auth.provider, uid: auth.uid).first_or_create do |member|
      member.email = auth.info.email
      member.password = Devise.friendly_token[0,20]
      member.title = auth.info.name
    end
  end

```

**registrations\_controller.rb**

```
  def facebook
    @member = Member.from_omniauth(request.env["omniauth.auth"])
    if @member.persisted?
      sign_in_and_redirect @member, :event => :authentication
      set_flash_message(:notice, :success, :kind => "Facebook") if is_navigational_format?
    else
      session["devise.facebook_data"] = request.env["omniauth.auth"]
      redirect_to new_member_registration_url
    end
  end

  def failure
    redirect_to root_path
  end

  def passthru
  end

```

**initializers/devise.rb**

```
config.omniauth :facebook, "<app_id>", "<app_secret>"

```