Skip to content

Instantly share code, notes, and snippets.

@gbellmann
Created April 10, 2015 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbellmann/e070d0069c6b0b245b3e to your computer and use it in GitHub Desktop.
Save gbellmann/e070d0069c6b0b245b3e to your computer and use it in GitHub Desktop.
private MobileServiceUser usuario;
private async System.Threading.Tasks.Task Autenticar()
{
while (usuario == null)
{
string mensaje;
try
{
usuario = await App.MobileService
.LoginAsync(MobileServiceAuthenticationProvider.Facebook);
mensaje =
string.Format("Has iniciado sesión - {0}", usuario.UserId);
}
catch (InvalidOperationException)
{
mensaje = "Debes iniciar sesión. Inicio de sesión requerido.";
}
MessageBox.Show(mensaje);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment