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

@ -1,4 +1,5 @@
<!DOCTYPE html>
@inject SignInManager<IdentityUser> SignInManager
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
@ -39,6 +40,16 @@
<a class="nav-link" asp-controller="Organizations" asp-action="Index">Organizations</a>
</li>
</ul>
@if(SignInManager.IsSignedIn(User))
{
<form asp-controller="Login" asp-action="Logout" method="post">
<button type="submit" class="btn btn-secondary">Log Out</button>
</form>
}
else
{
<a class="btn btn-secondary" asp-controller="Login" asp-action="Index">Log In</a>
}
</div>
</div>
</nav>

View File

@ -1,3 +1,4 @@
@using Microsoft.AspNetCore.Identity
@using Bit.Admin
@using Bit.Admin.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers