Skip to content

Instantly share code, notes, and snippets.

@marcos-bah
Last active June 18, 2020 13:15
Show Gist options
  • Save marcos-bah/cd168c770b320e931c9a56a950a92979 to your computer and use it in GitHub Desktop.
Save marcos-bah/cd168c770b320e931c9a56a950a92979 to your computer and use it in GitHub Desktop.
SignIn com GitHub
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