OAuth2 frameworks for macOS, iOS, and tvOS written in Swift 5.0. OAuth2 requires Xcode 10.2, the built framework can be used on OS X 10.11 or iOS 8 and later. Happy to accept pull requests, please see CONTRIBUTING.md. Since the Swift language is constantly evolving I have adopted a versioning scheme mirroring Swift versions: the framework version's first two digits are always the Swift version the library is compatible with, see releases. Code compatible with brand-new Swift versions should be found on a separate feature branch named appropriately. In OAuth2 there are different kinds of flows. This library supports all of them, make sure you're using the correct one for your use-case and authorization server. A typical code grant flow is used for demo purposes below. The steps for other flows are mostly the same short of instantiating a different subclass and using different client settings.
Features
- Instantiate OAuth2 with a Settings Dictionary
- Let the Data Loader or Alamofire Take Over
- Make Sure You Intercept the Callback
- Manually Authorize the User
- Manually Performing Authorization
- Advanced Settings