This demo application shows you how to implement GitHub login with OAuth2 to your apps in a VERY SIMPLE way. I researched OAuth2 authentication demo to use in my personal project, but there wasn't any simple one and everyone of them was full of little and hard to solve box. I decided to do it myself and share it with you.
- ViewController
// data from your Github app
let client_id = "your client id"
let client_secret = "your client scret"
let scope = "user repo:status"
let redirect_uris = ["githuboauth://oauth/callback"] // same with Github app settings
let token_uri = "https://github.com/login/oauth/access_token"
- AppDelegate
...
"githubauth" == url.scheme || (url.scheme?.hasPrefix("me.batuhan.GitHubAuth")) // change the schemes
...
Hope you enjoy it and find it useful 🤓
Note: I could defined the whole project: "It just works". Sorry for that ✋