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

Commit

Permalink
Merge pull request #105 from skedgo/master
Browse files Browse the repository at this point in the history
Fix for OAuth providers that don't use oauth_verifier
  • Loading branch information
mattt committed Nov 24, 2014
2 parents 0fa0035 + 0026db9 commit 3d21b2a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions AFOAuth1Client/AFOAuth1Client.m
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,14 @@ - (void)acquireOAuthAccessTokenWithPath:(NSString *)path
success:(void (^)(AFOAuth1Token *accessToken, id responseObject))success
failure:(void (^)(NSError *error))failure
{
if (requestToken.key && requestToken.verifier) {
if (requestToken.key) {
self.accessToken = requestToken;

NSMutableDictionary *parameters = [[self OAuthParameters] mutableCopy];
parameters[@"oauth_token"] = requestToken.key;
parameters[@"oauth_verifier"] = requestToken.verifier;
if (requestToken.verifier) {
parameters[@"oauth_verifier"] = requestToken.verifier;
}

NSMutableURLRequest *request = [self requestWithMethod:accessMethod path:path parameters:parameters];

Expand Down

0 comments on commit 3d21b2a

Please sign in to comment.