From 10f7a4041956a655465cc38718cb63e0f31aa541 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Mon, 13 Jan 2020 22:04:25 -0800 Subject: [PATCH] Add /api/Login/Logout endpoint. --- Server/API/LoginController.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Server/API/LoginController.cs b/Server/API/LoginController.cs index de082887..5ba3d85d 100644 --- a/Server/API/LoginController.cs +++ b/Server/API/LoginController.cs @@ -55,5 +55,12 @@ namespace Remotely.Server.API DataService.WriteEvent($"API login unsuccessful due to bad attempt for {login.Email}."); return BadRequest(); } + + [HttpGet("Logout")] + public async Task Logout() + { + await SignInManager.SignOutAsync(); + return Ok(); + } } }