Skip to content
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

Add Password Expiration feature #535

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix to work with pre 2.2 ruby versions
  • Loading branch information
chhlga committed Oct 3, 2016
commit bfe4a5df37b1d94c0aadfd5b7024bdb1022d6de1
2 changes: 1 addition & 1 deletion lib/sorcery/providers/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize

def get_user_hash(access_token)
response = access_token.get(user_info_path)

auth_hash(access_token).tap do |h|
h[:user_info] = JSON.parse(response.body).tap do |uih|
uih['email'] = primary_email(access_token) if scope =~ /user/
Expand Down
8 changes: 4 additions & 4 deletions spec/controllers/controller_oauth2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ def stub_all_oauth2_requests!
"last_name"=>"Ben Ari"
}
],
"user": {
"name": "Sonny Whether",
"id": "123",
"email": "[email protected]"
"user"=> {
"name"=>"Sonny Whether",
"id"=>"123",
"email"=>"[email protected]"
}
}.to_json }
allow(access_token).to receive(:get) { response }
Expand Down