Last active
September 18, 2016 23:30
-
-
Save delba/17ce1f5cd6a894fe0d3b07c7f1694bd9 to your computer and use it in GitHub Desktop.
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
let google: Provider = .google(clientID: "", clientSecret: "") | |
google.scopes = ["email", "profile"] | |
google.authorize(getCode: { code, url in | |
// prompt user to visit url and enter code | |
}) { result in | |
switch result { | |
case .success(let token): | |
print(token) | |
case .failure(let error): | |
print(error) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm afraid that 'getCode' is not enough to communicate to the client that he is kicking off a device authentication flow and not just "a" code.