Swiftpack.co - Swifteroid/ReactiveOAuth as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Swifteroid.
Swifteroid/ReactiveOAuth 3.1.0
OAuthSwift + ReactiveSwift = 🦄💖
⭐️ 1
🕓 2 weeks ago
.package(url: "https://github.com/Swifteroid/ReactiveOAuth.git", from: "3.1.0")


Build Status GitHub Release Carthage Compatible Platform

ReactiveOAuth is a wrapper for OAuthSwift with ReactiveSwift support and some pre-configured services, mostly useful in macOS projects.

import AppKit
import Foundation
import ReactiveOAuth
import ReactiveSwift

internal class MainViewController: NSViewController
    @IBAction private func handleOAuthButtonAction(_ button: NSButton) {
        let storyboard: NSStoryboard = NSStoryboard(name: "main", bundle: Bundle.main)
        let controller: OAuthViewController = storyboard.instantiateController(withIdentifier: "OAuthViewController") as! OAuthViewController
        let configuration: OAuth.Configuration = Dropbox.configure(access: Access(key: "foo", secret: "bar"), url: "https://baz.com/quz")
        let detalisator: Detalisator<String> = DropboxDetalisator()
        let oauth: DetailedOAuth<String> = DetailedOAuth(oauth: OAuth(configuration: configuration), detalisator: detalisator)

            value: { (credential: Credential, string: String) in
                Swift.print(credential, string)
            failed: { (error: ReactiveOAuth.Error) in

        self.authorise(oauthViewController: controller, oauth: oauth)


Add ReactiveOAuth as a dependency of your package in Package.swift:

.package(url: "https://github.com/Swifteroid/ReactiveOAuth.git", from: "1.0.0")


ReactiveOAuth uses real accounts for testing provided in test/oauth.json, they are kept blank for security reasons and injected by Travis CI during testing. So, if you want to test your own integrations, simply configure required services, unconfigured ones will be skipped. Travis expects REACTIVEOAUTH_CREDENTIALS environment variable, the following command copies current configuration in acceptable format escaped for shell.

jq --join-output "tojson | @sh" test/oauth.json | pbcopy


Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

4 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics