Fixed auth flow and added scaffolding vite config.

This commit is contained in:
SamTV12345 2024-03-24 21:12:58 +01:00
parent 66fc735253
commit 04e4a5eee0
18 changed files with 226 additions and 37 deletions

View file

@ -26,17 +26,14 @@
body: JSON.stringify(data),
}).then(response => {
if (response.ok) {
return response.json();
}
throw new Error('Network response was not ok.');
}).then(data => {
if (data.status === 'success') {
window.location.href = data.redirect;
if (response.redirected) {
window.location.href = response.url;
}
} else {
document.getElementById('error').innerText = "Error signing in";
}
}).catch(error => {
console.error('There has been a problem with your fetch operation:', error);
document.getElementById('error').innerText = "Error signing in"+error;
});
});
}