title: Devise and routes for omniauth
body: <p>I am using Devise for authentication users, this is what is in the <strong>routes.rb</strong> file:</p>
  
  <pre><code>devise_for :users, :path_names =&gt; { :sign_in =&gt; 'login', :sign_out =&gt; 'logout', :password =&gt; 'secret',
                                      :confirmation =&gt; 'verification', :unlock =&gt; 'unlock', :registration =&gt; 'register',
                                      :sign_up =&gt; 'signup' }
  </code></pre>
  
  <p>And I added a part for omniauth (for LinkedIn):</p>
  
  <pre><code>devise_for :users, :path_names =&gt; { :sign_in =&gt; 'login', :sign_out =&gt; 'logout', :password =&gt; 'secret',
                                      :confirmation =&gt; 'verification', :unlock =&gt; 'unlock', :registration =&gt; 'register',
                                      :sign_up =&gt; 'signup' }, :controllers =&gt; { :omniauth_callbacks =&gt; "omniauth_callbacks" }
  </code></pre>
  
  <p>In the view:</p>
  
  <pre><code>&lt;% if user_signed_in? %&gt;
    Signed in as &lt;%= current_user.email %&gt;. Not you?
    &lt;%= link_to "Sign out", destroy_user_session_path,:method =&gt; :delete %&gt;
    &lt;% else %&gt;
    &lt;%= link_to "Sign up", new_user_registration_path %&gt; or
    &lt;%= link_to "Sign in", new_user_session_path %&gt;
    &lt;%= link_to "Sign in with Linkedin",user_omniauth_authorize_path(:linkedin) %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And the error:</p>
  
  <pre><code>No route matches {:controller=&gt;"omniauth_callbacks", :action=&gt;"passthru", :provider=&gt;:linkedin, :format=&gt;nil} missing required keys: [:provider]
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Thank you</p>