fixes in 2fa redirect after login

This commit is contained in:
biersoeckli
2024-12-19 17:42:48 +01:00
parent 48250fca6b
commit 314d6417bd
2 changed files with 12 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
# QuickStack
QuickStack is a open source self-hosted Platform-as-a-Service (PaaS) solution designed to simplify the management of containerized applications on Virtual Private Server (VPS) infrastructures.
Developed as part of a student project at the [Eastern Switzerland University of Applied Sciences](https://ost.ch/), QuickStack provides a cost-effective alternative to commercial cloud PaaS offerings like Vercel, Digital Ocean App Platform or Azure App Service.
Developed as part of a student project at the [Eastern Switzerland University of Applied Sciences](https://ost.ch/), QuickStack provides a scalable and cost-effective alternative to commercial cloud PaaS offerings like Vercel, Digital Ocean App Platform or Azure App Service.
## Key Features
@@ -12,7 +12,7 @@ Developed as part of a student project at the [Eastern Switzerland University of
* **SSL Certificate Management:** Automatic SSL certificate generation via Let's Encrypt.
* **Resource Management:** Set resource limits (CPU, RAM, storage) for each application.
* **Monitoring Dashboard:** Track resource consumption and application performance.
* **Persistent Storage:** Attach persistent storage volumes to applications using Longhorn.
* **Persistent Storage:** Cluster-wide persistent storage volumes for applications using Longhorn.
* **Cluster Support:** Scale applications across multiple VPS nodes using Kubernetes.
## Getting Started

View File

@@ -30,6 +30,14 @@ export default function TwoFaAuthForm({
const [errorMessages, setErrorMessages] = useState<string | undefined>(undefined);
const [loading, setLoading] = useState<boolean>(false);
function redirectToProjects() {
const currentUrl = window.location.href
const url = new URL(currentUrl)
url.pathname = '/'
url.search = ''
window.open(url.toString(), '_self')
}
const authWith2Fa = async (data: TwoFaInputSchema) => {
setLoading(true);
setErrorMessages(undefined);
@@ -38,8 +46,9 @@ export default function TwoFaAuthForm({
username: authData.email,
password: authData.password,
totpToken: data.twoFactorCode,
redirect: true,
redirect: false,
});
redirectToProjects();
} catch (e) {
console.log(e);
setErrorMessages((e as any).message);