Skip to content

Loading…

Update accounts API call #2

Merged
merged 1 commit into from

3 participants

@karenc
OpenStax member

No description provided.

@karenc
OpenStax member

Now using /api/users/me.json instead.

@jpslav jpslav commented on an outdated diff
lib/omniauth/strategies/openstax.rb
((6 lines not shown))
info do
{
username: raw_info["username"],
- first_name: raw_info["first_name"],
@jpslav OpenStax member
jpslav added a note

Why remove first_name and last_name?

@karenc OpenStax member
karenc added a note

I thought you removed it from the api...

@jpslav OpenStax member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@karenc
OpenStax member

Updated to not remove first name and last name

@edwoodward edwoodward merged commit fc5292b into openstax:master
@karenc karenc deleted the karenc:accounts-api-update branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 7, 2014
  1. @karenc

    Update accounts API call

    karenc committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/omniauth/strategies/openstax.rb
View
4 lib/omniauth/strategies/openstax.rb
@@ -11,7 +11,7 @@ class Openstax < OAuth2
:authorize_url => "/oauth/authorize"
}
- uid { raw_info["uid"] }
+ uid { raw_info["id"] }
info do
{
@@ -23,7 +23,7 @@ class Openstax < OAuth2
end
def raw_info
- @raw_info ||= access_token.get('/api/v1/me.json').parsed
+ @raw_info ||= access_token.get('/api/users/me.json').parsed
end
end
end
Something went wrong with that request. Please try again.