Last active
June 18, 2020 13:15
-
-
Save marcos-bah/cd168c770b320e931c9a56a950a92979 to your computer and use it in GitHub Desktop.
SignIn com GitHub
This file contains 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
final GitHubSignIn gitHubSignIn = GitHubSignIn( | |
clientId: "<ClientId>", | |
clientSecret: | |
"<ClientSecret>", | |
redirectUrl: | |
"<CallBack>"); | |
var result = await gitHubSignIn.signIn(context); | |
switch (result.status) { | |
case GitHubSignInResultStatus.ok: | |
print(result.token); | |
break; | |
case GitHubSignInResultStatus.cancelled: | |
case GitHubSignInResultStatus.failed: | |
print(result.errorMessage); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment