1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

persist login. allow log out

This commit is contained in:
Kyle Spearrin
2018-03-23 10:12:09 -04:00
parent 1b313e6df4
commit 0d12cf9217
5 changed files with 23 additions and 5 deletions

View File

@ -40,7 +40,7 @@ namespace Bit.Admin.Controllers
public async Task<IActionResult> Confirm(string email, string token, string returnUrl)
{
var result = await _signInManager.PasswordlessSignInAsync(email, token, false);
var result = await _signInManager.PasswordlessSignInAsync(email, token, true);
if(!result.Succeeded)
{
// TODO: error?
@ -54,5 +54,13 @@ namespace Bit.Admin.Controllers
return RedirectToAction("Index", "Home");
}
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Logout()
{
await _signInManager.SignOutAsync();
return RedirectToAction("Index");
}
}
}