Browse Source

Auto redirect for login

pull/1/head
Sebastian 10 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> <html>
<head> <head>
<title>Squidex - Login failed</title> <title>Squidex - Login failed</title>
<style>
body {
padding: 40px;
}
h1, p {
text-align: center;
}
</style>
</head> </head>
<body> <body>
<h1>Login failed</h1> <h1>Login failed</h1>
<p>
We are really sorry, something failed when you tried to login.
</p>
</body> </body>
</html> </html>

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

@ -7,18 +7,28 @@
<html> <html>
<head> <head>
<title>Squidex - Login</title> <title>Squidex - Login</title>
<style>
button {
display: none;
}
</style>
</head> </head>
<body> <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> <div>
<p> <p>
@foreach (var provider in Model.ExternalProviders) @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> </p>
</div> </div>
</form> </form>
<script>
document.getElementById("loginButton").click();
</script>
</body> </body>
</html> </html>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save