Simplicity
Simplicity is an open-source library for adding OAuth2 login to your iOS app. It’s simple and powerful, making it easy to login on various social media sites and perform RESTful API calls.
Installation
- CocoaPods: Add `pod ‘Simplicity’, ‘~> 0.3.2’` to your Podfile.
- Manual: Drag files from ‘Simplicity’ folder into the project.
How to Use
To use Simplicity in your application, you need to initialize it with your redirect URL. Then you can add various login methods for various providers including Google, Facebook, and LinkedIn.
Handling the Redirect
When the login process successfully or fails, the provider redirects to your specified URL. You should also include an intermediate page that redirects the user back to your app. The intermediate page should close the web view or Safari view controller.
Making API Calls
With Simplicity, you can make authorized API calls, with the access token automatically added to the Authorization header for you. You can define a request and make a call using the URLSession-based APIs.
Built With
- Swift – The programming language used.
Contributing
Contributions are welcomed! Feel free to fork the repo and make pull requests.
License
Simplicity is open-source software licensed under the MIT license. Please take a look at the LICENSE file for details.