From 2b31753265c9e8d07438bbc71b1a9fad4f2a11fd Mon Sep 17 00:00:00 2001 From: Mohamed Maoulainine Maoulainine Date: Sat, 12 Apr 2025 03:55:30 +0200 Subject: [PATCH] feat: added an login page but the auth issue is still persisting, found a way to interprete the token the line is commneted in case it breaks code or needs a change --- .../src/components/LoginComponent.vue | 171 ++++++++++++++++++ .../components/PendingProjectComponent.vue | 2 +- front/MyINPulse-front/src/router/router.ts | 6 +- front/MyINPulse-front/src/stores/authStore.ts | 2 +- 4 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 front/MyINPulse-front/src/components/LoginComponent.vue diff --git a/front/MyINPulse-front/src/components/LoginComponent.vue b/front/MyINPulse-front/src/components/LoginComponent.vue new file mode 100644 index 0000000..ef48942 --- /dev/null +++ b/front/MyINPulse-front/src/components/LoginComponent.vue @@ -0,0 +1,171 @@ + + + + + + diff --git a/front/MyINPulse-front/src/components/PendingProjectComponent.vue b/front/MyINPulse-front/src/components/PendingProjectComponent.vue index 8c8c250..c6c95a6 100644 --- a/front/MyINPulse-front/src/components/PendingProjectComponent.vue +++ b/front/MyINPulse-front/src/components/PendingProjectComponent.vue @@ -3,7 +3,7 @@

{{ projectName }}

-

projet mis le: {{ creationDate }}

+

Projet mis le: {{ creationDate }}

diff --git a/front/MyINPulse-front/src/router/router.ts b/front/MyINPulse-front/src/router/router.ts index 6883c33..365e276 100644 --- a/front/MyINPulse-front/src/router/router.ts +++ b/front/MyINPulse-front/src/router/router.ts @@ -11,7 +11,11 @@ const router = createRouter({ // which is lazy-loaded when the route is visited. component: () => import('../views/testComponent.vue'), }, - + { + path: '/login', + name: 'login', + component: () => import('../components/LoginComponent.vue'), + }, { path: '/', name: 'Admin-main', diff --git a/front/MyINPulse-front/src/stores/authStore.ts b/front/MyINPulse-front/src/stores/authStore.ts index 06187ca..a5874d4 100644 --- a/front/MyINPulse-front/src/stores/authStore.ts +++ b/front/MyINPulse-front/src/stores/authStore.ts @@ -54,7 +54,7 @@ const useAuthStore = defineStore("storeAuth", { async logout() { try { await keycloakService.CallLogout( - import.meta.env.VITE_APP_URL + "/test" + import.meta.env.VITE_APP_URL + "/login" //redirect to login page instead of test... ); await this.clearUserData(); } catch (error) {