Latest 0.1.1
Homepage https://github.com/DeskConnect/WFOAuth2
License MIT
Platforms ios 8.0, osx 10.10, watchos 2.0, tvos 9.0, requires ARC
Frameworks Foundation
Authors

CocoaPods Compatible
Carthage Compatible
Swift Package Manager
Platform

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.

Supported Services

Google Google
Slack Slack
Uber Uber

…and more to come!

Usage

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 user

Installation

Carthage

To integrate WFOAuth2 into your Xcode project using Carthage, specify it in your Cartfile:

github "DeskConnect/WFOAuth2" ~> 0.1

CocoaPods

To integrate WFOAuth2 into your Xcode project using CocoaPods, specify it in your Podfile:

target 'MyApp' do
  pod 'WFOAuth2', '~> 0.1'
end

Swift Package Manager

To 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),
    ]
)

Contributing

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.

License

WFOAuth2 is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WFOAuth2",
    "version": "0.1.1",
    "summary": "WFOAuth2 is an extensible OAuth 2 library for macOS, iOS, tvOS and watchOS",
    "description": "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.",
    "homepage": "https://github.com/DeskConnect/WFOAuth2",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Conrad Kramer": "[email protected]"
    },
    "social_media_url": "https://twitter.com/conradev",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/DeskConnect/WFOAuth2.git",
        "tag": "0.1.1"
    },
    "source_files": [
        "Sources/WFOAuth2/*.m",
        "Sources/WFOAuth2/include/WFOAuth2/*.h"
    ],
    "public_header_files": "Sources/WFOAuth2/include/WFOAuth2/*.h",
    "frameworks": "Foundation",
    "requires_arc": true
}

Pin It on Pinterest

Share This