TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
MBGithubOAuthClient is a dead simple wrapper class for performing OAuth requests on Github. In addition to authentication, it offers 2 ways of saving access token - user defaults or iOS keychain.
MBGithubOAuthClient takes advantage of NSURLSession and a singleton pattern to setup proper authorization requests.
The easiest way to implement MBGithubOAuthClient is as a cocoa pod. Add the following line to your Podfile:
pod “MBGithubOAuthClient”
Register your app with GitHub to get client ID and client secret code.
Get a pointer to your singleton instance.
MBGithubOAuthClient *githubClient = [MBGithubOAuthClient clientWithID:kGithubClientID andSecret:kGithubClientSecret];
[githubClient oauthRequestWithParameters:@{ @"client_id" : githubClient.githubClientID, @"scope" : @"email,user" }];
[[MBGithubOAuthClient sharedClient]accessToken];
Feel free to send pull requests for fixes or create issues to request a new feature.
Thank you.
pod 'MBGithubOAuthClient'
Michael Babiy and John Clem