Created
March 13, 2016 10:36
-
-
Save ledestin/a75422ff706f79fcf2d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exchange a provided OAuth code for an OAuth access token, 'expires in' | |
# value, and refresh token. | |
def self.exchange_token(client_id, client_secret, redirect_uri, code) | |
response = request_token(client_id, client_secret, redirect_uri, code) | |
fail_on_erroneous_response(response, | |
"Error exchanging code for access token") | |
TokenResponse.from_hash(response) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment