Note that there are some explanatory texts on larger screens.

plurals
  1. POomniauth OAuthException & OAuth::Unauthorized
    primarykey
    data
    text
    <p>I have installed omniauth 1.0. Also I have oauth-0.4.5, oauth2-0.5.1, omniauth-facebook-1.0.0, omniauth-twitter-0.0.6.</p> <pre><code>omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :developer unless Rails.env.production? provider :facebook, ENV['167257285348131'], ENV['c8c722f697scb2afcf1600286c6212a9'], :scope =&gt; 'email,offline_access,read_stream', :display =&gt; 'popup' provider :twitter, ENV['fma2L22ObJCW52QrL7uew'], ENV['4aZfhCAOdiS7ap8pHJ7I1OZslFwVWWLiAMVpYUI'] end session_controller.rb class SessionsController &lt; ApplicationController require 'omniauth-facebook' require 'omniauth-twitter' require 'omniauth' def create @user = User.find_or_create_from_auth_hash(auth_hash) self.current_user = @user redirect_to '/' end def auth_hash request.env['omniauth.auth'] end end </code></pre> <p>Also I add 'omniauth' 'omniauth-facebook' 'omniauth-twitter' gems to gemfile</p> <p>There are two problems:</p> <ol> <li>When I go <a href="http://localhost:3000/auth/facebook" rel="noreferrer">http://localhost:3000/auth/facebook</a> I get { "error": { "message": "Missing client_id parameter.", "type": "OAuthException" } }</li> </ol> <p>And the link graph.facebook.com/oauth/authorize?response_type=code&amp;client_id=&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ffacebook%2Fcallback&amp;parse=query&amp;scope=email%2Coffline_access%2Cread_stream&amp;display=popup <strong>And there is no client_id!!!</strong></p> <ol start="2"> <li>When I go to <a href="http://localhost:3000/auth/twitter" rel="noreferrer">http://localhost:3000/auth/twitter</a> I get OAuth::Unauthorized</li> </ol> <p>401 Unauthorized</p> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload