Skip to content

Instantly share code, notes, and snippets.

@StarLard
Created June 11, 2021 02:50
Show Gist options
  • Save StarLard/c1e31e52fc1da876949955908c2c51f1 to your computer and use it in GitHub Desktop.
Save StarLard/c1e31e52fc1da876949955908c2c51f1 to your computer and use it in GitHub Desktop.
Brief demo showcasing login with SFSafariViewController
import SafariServices
func logInWithBlizzard() {
//Blizzard OAuth URL
if let authURL = URL(string: "https://myRegioncode.battle.net/oauth/authorize?access_type=online&client_id=myClientID&redirect_uri=myRedirectURI&response_type=code&state=") {
let safariVC = SFSafariViewController(url: authURL, entersReaderIfAvailable: true)
safariVC.delegate = self
self.present(safariVC, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment