From 6dcd60fe292efa8cc74dbfa57b0d93eb267fdbd1 Mon Sep 17 00:00:00 2001 From: RikThePixel Date: Wed, 10 Jan 2024 13:14:36 +0100 Subject: [PATCH] Add corrected frontend url to secrets --- .github/workflows/release-microservices.yml | 2 +- apps/frontend/src/lib/auth/stores/useAuth.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-microservices.yml b/.github/workflows/release-microservices.yml index 413b947..d04bc03 100644 --- a/.github/workflows/release-microservices.yml +++ b/.github/workflows/release-microservices.yml @@ -66,7 +66,7 @@ jobs: - name: Set secrets run: | kubectl create secret generic gateway-secrets \ - --from-literal=ALLOWED_ORIGIN="sq.rikdenbreejen.nl" + --from-literal=ALLOWED_ORIGIN="https://sq.rikdenbreejen.nl" kubectl create secret generic account-service-secrets \ --from-literal=DATABASE_USER="${{ secrets.DB_ADMIN_USER }}@squaremarket-accounts" \ diff --git a/apps/frontend/src/lib/auth/stores/useAuth.ts b/apps/frontend/src/lib/auth/stores/useAuth.ts index b08a285..dda2199 100644 --- a/apps/frontend/src/lib/auth/stores/useAuth.ts +++ b/apps/frontend/src/lib/auth/stores/useAuth.ts @@ -28,7 +28,11 @@ const useAuth = create((set, get) => ({ }, async logout() { - await auth.logout(); + await auth.logout({ + logoutParams: { + returnTo: window.origin + } + }); set({ user: null }); }, }));