Fixed RedirectUrl not working
This commit is contained in:
@@ -55,7 +55,8 @@ document.getElementById('loginForm').addEventListener('submit', async (e) => {
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
window.location.href = '/';
|
||||
let returnUrl = new URLSearchParams(window.location.search).get('ReturnUrl');
|
||||
window.location.href = returnUrl ? returnUrl : '/';
|
||||
} else {
|
||||
const error = await response.json();
|
||||
messageDiv.innerHTML = `<div class="alert alert-danger">${error.message}</div>`;
|
||||
|
||||
Reference in New Issue
Block a user