Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

GitHub auth - NameError at /auth/github #162

Open
pboguszewski opened this issue Jul 7, 2014 · 11 comments
Open

GitHub auth - NameError at /auth/github #162

pboguszewski opened this issue Jul 7, 2014 · 11 comments

Comments

@pboguszewski
Copy link

I seem to be in an auth hell. When attempting to use github auth (that appears to be properly setup) I get an error:

NameError at /auth/github
uninitialized constant Octokit::Configuration
file: oauth.rb location: build_uri line: 62

I see this on the console: [07/Jul/2014 14:22:32] "GET /auth/github HTTP/1.1" 500 292657 0.1212

My github org is uwlcb and my user is pboguszewski but I do not get far enough to ask for a user / password.

My .env seems to be properly pointing to github. I opened my firewalls up to port 5000, 80, and 443 for testing but do not believe this is the issue. I am running RHEL 6.5. I tried disabling SElinux with no luck. Please help - I am going a bit crazy...

@pboguszewski
Copy link
Author

Here is the sinatra error:

sinatra.error
NameError: uninitialized constant Octokit::Configuration

@pboguszewski
Copy link
Author

More info:

Warden::Proxy:50540800 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{:_all=>[:github]}, :intercept_401=>true, :failure_app=>Sinatra::Auth::Github::BadAuthentication, :github_secret=>"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", :github_scopes=>"", :github_client_id=>"bfXXXXXXXXXXXXXXXX", :github_oauth_domain=>"https://github.com", :github_callback_url=>"/auth/github/callback"}

@pboguszewski
Copy link
Author

rack.logger info:

<Rack::NullLogger:0x00000004ea72a8 @app=#<Rack::Protection::FrameOptions:0x00000004ea7438 @app=#<Rack::Protection::HttpOrigin:0x00000004ea7550 @app=#<Rack::Protection::IPSpoofing:0x00000004ea75c8 @app=#<Rack::Protection::JsonCsrf:0x00000004ea7640 @app=#<Rack::Protection::PathTraversal:0x00000004ea76e0 @app=#<Rack::Protection::XSSHeader:0x00000004ea77a8 @app=#<Sinatra::Auth::Github::AccessDenied:0x00000004ea8270 @default_layout=:layout, @app=#<Warden::Manager:0x00000004ea8630 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{:_all=>[:github]}, :intercept_401=>true, :failure_app=>Sinatra::Auth::Github::BadAuthentication, :github_secret=>"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", :github_scopes=>"", :github_client_id=>"bfXXXXXXXXXXXXXXXX", :github_oauth_domain=>"https://github.com", :github_callback_url=>"/auth/github/callback"}, @app=#<Descartes::GithubAuth:0x00000004ea8dd8 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x00000004ea8db0 @cache={}>>>, @template_cache=#<Tilt::Cache:0x00000004ea8248 @cache={}>>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :xss_mode=>:block, :nosniff=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :frame_options=>:sameorigin, :except=>[:session_hijacking, :remote_token]}>>

@1mentat
Copy link

1mentat commented Aug 19, 2014

I'm seeing this as well. Investigating.

@obfuscurity
Copy link
Owner

It's very possible that GitHub changed some of their OmniAuth stuff again.

/cc @brntbeer @atmos

@atmos
Copy link

atmos commented Aug 20, 2014

Oh, yeah. Newer versions of octokit have different options. You probably want a more recent version of warden-github to get on octokit 2.x.

@obfuscurity
Copy link
Owner

Cool, thanks @atmos.

@bleything
Copy link

Same problem here. Any solution in the works?

@atmos
Copy link

atmos commented May 19, 2015

@bleything What versions of octokit/warden-github?

@bleything
Copy link

The Gemfile has sinatra_auth_github locked to 0.13.3 which depends on warden-github ~> 0.13.1. I'm trying to upgrade sinatra_auth_github now and see what happens.

@bleything
Copy link

Upgrading sinatra_auth_github to 1.2.0 fixed the 500s I was getting but something in the auth step is failing. I can dig in further later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants