Created
June 11, 2021 02:50
-
-
Save StarLard/c1e31e52fc1da876949955908c2c51f1 to your computer and use it in GitHub Desktop.
Brief demo showcasing login with SFSafariViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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