fix: url interna
All checks were successful
Deploy QR Rapido / test (push) Successful in 26s
Deploy QR Rapido / build-and-push (push) Successful in 7m4s
Deploy QR Rapido / deploy-staging (push) Has been skipped
Deploy QR Rapido / deploy-production (push) Successful in 3m5s

This commit is contained in:
Ricardo Carneiro 2025-08-12 22:12:12 -03:00
parent 0fb14e6f14
commit 52849487a1

View File

@ -49,7 +49,15 @@ namespace QRRapidoApp.Controllers
[HttpGet]
public IActionResult LoginMicrosoft(string returnUrl = "/")
{
var redirectUrl = Url.Action("MicrosoftCallback", "Account", new { returnUrl });
var baseUrl = _configuration.GetSection("App:BaseUrl").Value;
//var redirectUrl = Url.Action("MicrosoftCallback", "Account", new { returnUrl });
var redirectUrl = "";
if (returnUrl == "/")
{
redirectUrl = $"{baseUrl}/Account/MicrosoftCallback";
}
var properties = new AuthenticationProperties { RedirectUri = redirectUrl };
return Challenge(properties, MicrosoftAccountDefaults.AuthenticationScheme);
}