New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omniauth error on login #54

Merged
merged 3 commits into from Aug 31, 2012
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+34 −63
Diff settings

Always

Just for now

Copy path View file
@@ -1,5 +1,7 @@
---
rvm: 1.9.2
rvm:
- 1.9.3
- 1.9.2
notifications:
disabled: true
script: "bundle exec rspec spec"
Copy path View file
@@ -16,7 +16,8 @@ end

gem 'haml'
gem 'jquery-rails'
gem 'omniauth'
gem 'omniauth', '~> 1.0'
gem 'omniauth-github'

group :development, :test do
gem "rspec-rails"
Copy path View file
@@ -30,7 +30,6 @@ GEM
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
addressable (2.2.4)
arel (2.2.1)
awesome_print (0.4.0)
bcrypt-ruby (3.0.1)
@@ -70,24 +69,26 @@ GEM
factory_girl_rails (1.2.0)
factory_girl (~> 2.1.0)
railties (>= 3.0.0)
faraday (0.6.1)
addressable (~> 2.2.4)
multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2)
faraday (0.8.4)
multipart-post (~> 1.1)
ffi (1.0.9)
fssm (0.2.7)
guard (0.6.3)
thor (~> 0.14.6)
guard-rspec (0.4.4)
guard (>= 0.4.0)
haml (3.1.2)
hashie (1.2.0)
hike (1.2.1)
httpauth (0.1)
i18n (0.6.0)
jquery-rails (1.0.13)
railties (~> 3.0)
thor (~> 0.14)
json_pure (1.5.4)
spruz (~> 0.2.8)
jwt (0.1.5)
multi_json (>= 1.0)
launchy (2.0.3)
mail (2.3.0)
i18n (>= 0.4.0)
@@ -105,62 +106,34 @@ GEM
mongoid_fulltext (0.4.4)
unicode_utils (~> 1.0.0)
multi_json (1.0.3)
multi_xml (0.2.2)
multipart-post (1.1.3)
net-ldap (0.2.2)
multipart-post (1.1.5)
nokogiri (1.4.7)
oa-basic (0.2.6)
oa-core (= 0.2.6)
rest-client (~> 1.6.0)
oa-core (0.2.6)
oa-enterprise (0.2.6)
addressable (= 2.2.4)
net-ldap (~> 0.2.2)
nokogiri (~> 1.4.2)
oa-core (= 0.2.6)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
oa-more (0.2.6)
multi_json (~> 1.0.0)
oa-core (= 0.2.6)
rest-client (~> 1.6.0)
oa-oauth (0.2.6)
faraday (~> 0.6.1)
multi_json (~> 1.0.0)
multi_xml (~> 0.2.2)
oa-core (= 0.2.6)
oauth (~> 0.4.0)
oauth2 (~> 0.4.1)
oa-openid (0.2.6)
oa-core (= 0.2.6)
rack-openid (~> 1.3.1)
ruby-openid-apps-discovery (~> 1.2.0)
oauth (0.4.5)
oauth2 (0.4.1)
faraday (~> 0.6.1)
multi_json (>= 0.0.5)
omniauth (0.2.6)
oa-basic (= 0.2.6)
oa-core (= 0.2.6)
oa-enterprise (= 0.2.6)
oa-more (= 0.2.6)
oa-oauth (= 0.2.6)
oa-openid (= 0.2.6)
oauth2 (0.8.0)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
omniauth (1.1.1)
hashie (~> 1.2)
rack
omniauth-github (1.0.3)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.0)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
polyglot (0.3.2)
pry (0.9.5)
coderay (>= 0.9.8)
method_source (>= 0.6.5)
ruby_parser (>= 2.0.5)
slop (~> 2.1.0)
pyu-ruby-sasl (0.0.3.3)
rack (1.3.3)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
@@ -182,8 +155,6 @@ GEM
thor (~> 0.14.6)
rake (0.9.2)
rdoc (3.9.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
@@ -197,12 +168,8 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
ruby_parser (2.3.0)
sexp_processor (~> 3.0)
rubyntlm (0.1.1)
rubyzip (0.9.4)
sass (3.1.7)
sass-rails (3.1.0)
@@ -253,7 +220,8 @@ DEPENDENCIES
launchy
mongoid
mongoid_fulltext
omniauth
omniauth (~> 1.0)
omniauth-github
pry
rails (= 3.1.0)
rspec-rails
@@ -1,7 +1,7 @@
class SessionsController < ApplicationController
def create
user_info = request.env['omniauth.auth']['user_info']
user_hash = request.env['omniauth.auth']['extra']['user_hash']
user_info = request.env['omniauth.auth']['info']
user_hash = request.env['omniauth.auth']['extra']['raw_info']

user = find_or_create_from_oauth_data(user_info, user_hash)

Copy path View file
@@ -5,7 +5,7 @@

OmniAuth.config.test_mode = true
OmniAuth.config.mock_auth[:default] = {
'user_info' => {
'info' => {
'name' => "Foo Bar",
'email' => "foo@example.com",
'urls' => {
@@ -14,7 +14,7 @@
}
},
'extra' => {
'user_hash' => {
'raw_info' => {
'login' => "foobar",
'gravatar_id' => "foobar",
'location' => "Not in Portland, OR"
Copy path View file
@@ -8,7 +8,7 @@ def login(user = nil)
def oauth_mock(user)
data = {
"extra" => {
"user_hash" => {
"raw_info" => {
"login" => user.github_login,
"gravatar_id" => user.gravatar_id,
"location" => user.location
ProTip! Use n and p to navigate between commits in a pull request.