diff --git a/Pages/Login.cshtml.cs b/Pages/Login.cshtml.cs
index c6deb96..4daba60 100644
--- a/Pages/Login.cshtml.cs
+++ b/Pages/Login.cshtml.cs
@@ -1,3 +1,4 @@
+
using System.Security.Claims;
using JustShortIt.Model;
using Microsoft.AspNetCore.Authentication;
@@ -42,7 +43,7 @@ public class LoginModel : PageModel {
new ClaimsPrincipal(identity),
properties);
- return RedirectToPage("Urls");
+ return LocalRedirect("~/urls");
}
ModelState.AddModelError(string.Empty, "Invalid Username or Password");
diff --git a/Pages/Logout.cshtml.cs b/Pages/Logout.cshtml.cs
index e3da974..84f8a56 100644
--- a/Pages/Logout.cshtml.cs
+++ b/Pages/Logout.cshtml.cs
@@ -8,6 +8,6 @@ namespace JustShortIt.Pages;
public class LogoutModel : PageModel {
public async Task OnGetAsync() {
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
- return RedirectToPage("Index");
+ return LocalRedirect("~/");
}
}
\ No newline at end of file