Skip to content

Commit

Permalink
Merge pull request #670 from bcgov/shaun-dev
Browse files Browse the repository at this point in the history
fixed login
  • Loading branch information
suzalflueck authored Nov 1, 2024
2 parents 1f4411e + 61e6228 commit 3c43e2a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<v-app>
<Snackbar></Snackbar>

<Bcheader class="bcheader">
<div v-if="isAuthenticatedGet && dataReady">
<v-btn @click="dialog = true">{{ userInfoGet.userName }}</v-btn>
Expand Down Expand Up @@ -57,13 +58,13 @@
<v-card-text>
<p v-if="tokenExpired">Your session has expired. Please Login.</p>
<p v-else>
Your session is about to expire in {{ timerValue }} seconds. Are
you still there?
Your session is about to expire in {{ timerValue }} seconds. Do
you want to extend your session?
</p>
</v-card-text>

<v-card-actions>
<v-btn @click="login" v-if="tokenExpired">Login</v-btn>
<v-btn :href="authRoutes.LOGIN" v-if="tokenExpired">Login</v-btn>
<v-btn @click="resumeSession" v-else>Yes</v-btn>
<v-btn @click="logout">Logout</v-btn>
</v-card-actions>
Expand Down Expand Up @@ -133,8 +134,8 @@ export default {
dataReady: function () {
return this.userInfoGet;
},
loginUrl: function () {
return this.authRoutes.LOGIN;
timeRemaining: function () {
return Math.floor(this.timerValue);
},
},
methods: {
Expand Down Expand Up @@ -177,7 +178,7 @@ export default {
},
login() {
// Use Vue Router to navigate to the login route
this.$router.push(this.loginUrl);
this.$router.push(this.authRoutes.LOGIN);
},
},
};
Expand Down

0 comments on commit 3c43e2a

Please sign in to comment.