Skip to content

Instantly share code, notes, and snippets.

@gonzaloruizdevilla
Created September 26, 2019 15:17
Show Gist options
  • Save gonzaloruizdevilla/402f7a2481b2687202c5438b9e2b7b87 to your computer and use it in GitHub Desktop.
Save gonzaloruizdevilla/402f7a2481b2687202c5438b9e2b7b87 to your computer and use it in GitHub Desktop.
private async Task SuccessfulLogin (IDialogContext context, IAwaitable<GetTokenResponse> tokenResponse) {
var token = await tokenResponse;
var client = new SimpleGraphClient (token.Token);
var me = await client.GetMe ();
await context.PostAsync ($”Login successful — welcome {me.DisplayName}”);
}
public static async Task Signout (IDialogContext context) {
await context.SignOutUserAsync (ConnectionName);
await context.PostAsync ($”You have been signed out.”);
}
private GetTokenDialog CreateGetTokenDialog () {
return new GetTokenDialog (
ConnectionName,
$”Please click below button to log in and proceed.”,
“Sign In”,
2,
“Hmm. Something went wrong, let’s try again.”);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment