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:
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user