CocoaPods trunk is moving to be read-only. Read more on the blog, there are 12 months to go.
| TestsTested | ✓ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jul 2016 |
| SPMSupports SPM | ✓ |
Maintained by Conrad Kramer.
WFOAuth2 is an extensible OAuth 2 library for macOS, iOS, tvOS and watchOS. It aims to simplify authenticating your app with a variety of services.
| Slack | |
| Uber |
...and more to come!
WFOAuth2 is very straightforward to use. This is how you authenticate with Google, for example:
WFGoogleOAuth2SessionManager *sessionManager = [[WFGoogleOAuth2SessionManager alloc] initWithClientID:@"XXXX-yyyy.apps.googleusercontent.com"
clientSecret:nil];
NSURL *redirectURI = [NSURL URLWithString:WFGoogleNativeRedirectURIString];
WKWebView *webView = [sessionManager authorizationWebViewWithScope:WFGoogleProfileScope
redirectURI:redirectURI
completionHandler:^(WFOAuth2Credential *credential, NSError *error) {
NSLog(@"Token: %@", credential.accessToken);
}];
// Display web view to userTo integrate WFOAuth2 into your project using the Swift Package Manager, specify it in your Package.swift file:
import PackageDescription
let package = Package(
name: "MyApp",
dependencies: [
.Package(url: "https://github.com/DeskConnect/WFOAuth2.git", majorVersion: 0, minor: 1),
]
)If you are interested in contributing to WFOAuth2, check out the list of possible enhancements. We also want to add support for as many services as possible, so you could contribute a WFOAuth2SessionManager subclass for your favorite service.
WFOAuth2 is available under the MIT license. See the LICENSE file for more info.