Created
September 26, 2019 15:17
-
-
Save gonzaloruizdevilla/402f7a2481b2687202c5438b9e2b7b87 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
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