示例#1
0
 public async Task<ActionResult> FacebookSignInAsync(FacebookAccount account)
 {
     var auth = new FacebookAuthentication(this.Tenant);
     try
     {
         var result = await auth.AuthenticateAsync(account, this.RemoteUser).ConfigureAwait(false);
         return await this.OnAuthenticatedAsync(result).ConfigureAwait(true);
     }
     catch(NpgsqlException)
     {
         return this.Json("Access is denied.");
     }
 }
 public async Task<ActionResult> FacebookSignInAsync(FacebookAccount account)
 {
     var auth = new FacebookAuthentication();
     try
     {
         var result =
             await auth.AuthenticateAsync(account, this.RemoteUser);
         return this.OnAuthenticated(result);
     }
     catch (NpgsqlException)
     {
         return this.Json("Access is denied.");
     }
 }