mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
add oauth errors to audit logs
This commit is contained in:
parent
acfdbc8592
commit
a8cda15372
1 changed files with 4 additions and 1 deletions
|
@ -86,8 +86,11 @@ public async Task<ActionResult> Login(string appname, string appdesc, string ver
|
|||
return new HttpStatusCodeResult(403);
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch(Exception ex)
|
||||
{
|
||||
var db = new ApplicationDbContext();
|
||||
db.AuditLogs.Add(new Models.AuditLog("system", AuditLogLevel.Admin, "<b>The following error occurred during an OAuth2 authentication.</b><br/>" + ex.ToString()));
|
||||
db.SaveChanges();
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue