mirror of
https://github.com/bitwarden/server
synced 2025-12-21 10:43:44 +00: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