All checks were successful
BCards Multi-Tenant Deployment Pipeline / Run Tests (push) Successful in 10s
BCards Multi-Tenant Deployment Pipeline / PR Validation (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Run Tests (pull_request) Successful in 5s
BCards Multi-Tenant Deployment Pipeline / PR Validation (pull_request) Successful in 1s
BCards Multi-Tenant Deployment Pipeline / Build and Push Image (push) Successful in 9m22s
BCards Multi-Tenant Deployment Pipeline / Build and Push Image (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy bcards.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy spicylinks.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy luslinks.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy to Release Swarm (ARM) (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Cleanup Old Resources (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy bcards.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy spicylinks.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy luslinks.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deployment Summary (pull_request) Successful in 0s
BCards Multi-Tenant Deployment Pipeline / Deploy to Release Swarm (ARM) (push) Successful in 2m11s
BCards Multi-Tenant Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deployment Summary (push) Successful in 1s
123 lines
4.7 KiB
Plaintext
123 lines
4.7 KiB
Plaintext
@inject Microsoft.Extensions.Options.IOptions<BCards.Web.Configuration.TenantSettings> TenantConfig
|
|
@{
|
|
var tenant = TenantConfig.Value;
|
|
ViewData["Title"] = $"Login - {tenant.SiteName}";
|
|
var returnUrl = ViewBag.ReturnUrl as string;
|
|
var isPreview = ViewBag.IsPreview as bool? ?? false;
|
|
Layout = isPreview ? "_Layout" : "_UserPageLayout";
|
|
}
|
|
|
|
<div class="container py-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card shadow">
|
|
<div class="card-body p-4">
|
|
<div class="text-center mb-4">
|
|
<h2 class="text-primary fw-bold">@tenant.SiteName</h2>
|
|
<p class="text-muted">Entre na sua conta</p>
|
|
</div>
|
|
|
|
@if (Context.Request.Query.ContainsKey("error"))
|
|
{
|
|
<div class="alert alert-warning text-center mb-4" role="alert">
|
|
@switch (Context.Request.Query["error"].ToString())
|
|
{
|
|
case "session_expired":
|
|
<text>Sua sessão expirou. Por favor, faça login novamente.</text>
|
|
break;
|
|
case "remote_failure":
|
|
<text>Ocorreu um erro durante a autenticação com o provedor. Tente novamente.</text>
|
|
break;
|
|
default:
|
|
<text>Ocorreu um erro de autenticação. Tente novamente.</text>
|
|
break;
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<form asp-controller="Auth" asp-action="LoginWithGoogle" method="post" class="mb-3">
|
|
@if (!string.IsNullOrEmpty(returnUrl))
|
|
{
|
|
<input type="hidden" name="returnUrl" value="@returnUrl" />
|
|
}
|
|
<button type="submit" class="btn btn-danger w-100 mb-2 d-flex align-items-center justify-content-center">
|
|
<i class="me-2">🔴</i>
|
|
Entrar com Google
|
|
</button>
|
|
</form>
|
|
|
|
<form asp-controller="Auth" asp-action="LoginWithMicrosoft" method="post" class="mb-3">
|
|
@if (!string.IsNullOrEmpty(returnUrl))
|
|
{
|
|
<input type="hidden" name="returnUrl" value="@returnUrl" />
|
|
}
|
|
<button type="submit" class="btn btn-primary w-100 d-flex align-items-center justify-content-center">
|
|
<i class="me-2">Ⓜ️</i>
|
|
Entrar com Microsoft
|
|
</button>
|
|
</form>
|
|
|
|
@if (ViewBag.IsTestingEnvironment != null && ViewBag.IsTestingEnvironment)
|
|
{
|
|
<form asp-controller="Auth" asp-action="LoginWithTest" method="post" class="mb-3">
|
|
@if (!string.IsNullOrEmpty(returnUrl))
|
|
{
|
|
<input type="hidden" name="returnUrl" value="@returnUrl" />
|
|
}
|
|
<button type="submit" class="btn btn-warning w-100 mb-2 d-flex align-items-center justify-content-center">
|
|
<i class="me-2">🧪</i>
|
|
Login de Teste
|
|
</button>
|
|
</form>
|
|
}
|
|
|
|
<div class="text-center">
|
|
<small class="text-muted">
|
|
Não temos acesso à sua senha. <br>
|
|
Usamos apenas autenticação segura via OAuth.
|
|
</small>
|
|
</div>
|
|
|
|
<hr class="my-4">
|
|
|
|
<div class="text-center">
|
|
<small class="text-muted">
|
|
Não tem uma conta? É grátis para começar!
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-center mt-4">
|
|
<a asp-controller="Home" asp-action="Index" class="text-decoration-none">
|
|
← Voltar ao início
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@section Styles {
|
|
<style>
|
|
.card {
|
|
border-radius: 15px;
|
|
border: none;
|
|
}
|
|
|
|
.btn {
|
|
border-radius: 10px;
|
|
font-weight: 500;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.btn-danger {
|
|
background-color: #db4437;
|
|
border-color: #db4437;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background-color: #c23321;
|
|
border-color: #c23321;
|
|
}
|
|
</style>
|
|
} |