The base class for handling OAuth2 flow on iOS using SFSafariViewController
(SFAuthenticationSession
for iOS11), currently supportsOAuth2CodeGrant
, tested on Facebook , Google & Github (example app includes code for all).
OAuth2Client
supports custom handlers for updating UI during the authentication flow.
- iOS 9.0+
- Xcode 9.0
- Swift 4.0
OAuthKit can be integrated manually into your project, dependency managers support coming soon.
-
Add OAuthKit as a git submodule by running the following command:
$ git submodule add https://github.com/muhammadbassio/OAuthKit.git
-
Open the
OAuthKit
folder, and dragOAuthKit.xcodeproj
into the Project Navigator of your application's Xcode project. -
Navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.
-
In the tab bar at the top of that window, open the "General" panel.
-
Click on the
+
button under the "Embedded Binaries" section. -
Select the framework (currently
OAuthKit.framework
). -
Enjoy
☺️
Included Example app shows how to configure and use OAuthKit.
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
OAuthKit is released under the MIT license. See LICENSE for details.