Skip to content

Commit

Permalink
Merge pull request OAuthSwift#83 from Poupouch/patch-1
Browse files Browse the repository at this point in the history
Handle cancellation of the Authentication
  • Loading branch information
Dongri Jin committed Jul 22, 2015
2 parents db8c441 + 20b809d commit 32c9280
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OAuthSwift/OAuth2Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public class OAuth2Swift: NSObject {
success: { credential, response, responseParameters in
success(credential: credential, response: response, parameters: responseParameters)
}, failure: failure)

}
if let error = responseParameters["error"], error_description = responseParameters["error_description"] {
let errorInfo = [NSLocalizedFailureReasonErrorKey: NSLocalizedString(error, comment: error_description)]
failure(error: NSError(domain: OAuthSwiftErrorDomain, code: -1, userInfo: errorInfo))
}
})
//let authorizeURL = NSURL(string: )
Expand Down

0 comments on commit 32c9280

Please sign in to comment.