Browse Source

Auto redirect for login

pull/1/head
Sebastian 9 years ago
parent
commit
83f78e5240
  1. 13
      src/Squidex/Views/Account/Error.cshtml
  2. 14
      src/Squidex/Views/Account/Login.cshtml
  3. BIN
      src/Squidex/wwwroot/images/logo-squared-120.png

13
src/Squidex/Views/Account/Error.cshtml

@ -2,8 +2,21 @@
<html>
<head>
<title>Squidex - Login failed</title>
<style>
body {
padding: 40px;
}
h1, p {
text-align: center;
}
</style>
</head>
<body>
<h1>Login failed</h1>
<p>
We are really sorry, something failed when you tried to login.
</p>
</body>
</html>

14
src/Squidex/Views/Account/Login.cshtml

@ -7,18 +7,28 @@
<html>
<head>
<title>Squidex - Login</title>
<style>
button {
display: none;
}
</style>
</head>
<body>
<form asp-controller="Account" asp-action="External" asp-route-returnurl="@Model.ReturnUrl" method="post" class="form-horizontal">
<form asp-controller="Account" asp-action="External" asp-route-returnurl="@Model.ReturnUrl" method="post">
<div>
<p>
@foreach (var provider in Model.ExternalProviders)
{
<button type="submit" class="btn btn-default" name="provider" value="@provider.AuthenticationScheme" title="Log in using your @provider.DisplayName account">@provider.AuthenticationScheme</button>
<button type="submit" name="provider" id="loginButton" value="@provider.AuthenticationScheme" title="Log in using your @provider.DisplayName account">@provider.AuthenticationScheme</button>
}
</p>
</div>
</form>
<script>
document.getElementById("loginButton").click();
</script>
</body>
</html>

BIN
src/Squidex/wwwroot/images/logo-squared-120.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save