From d95e2bf4832842d484ed5cb8b7f905529a72f4b8 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Sun, 25 Aug 2019 22:53:23 -0500 Subject: [PATCH] Begin auth upgrades moving to Auth0 universal login --- src/app/src/App.vue | 12 +- src/app/src/auth/AuthService.js | 156 ++++++++++++------- src/app/src/components/common/Navigation.vue | 15 +- src/app/src/components/user/LogOn.vue | 10 +- src/app/src/main.js | 2 + src/app/src/plugins/auth.js | 22 +++ src/app/src/router.js | 10 +- 7 files changed, 155 insertions(+), 72 deletions(-) create mode 100644 src/app/src/plugins/auth.js diff --git a/src/app/src/App.vue b/src/app/src/App.vue index 3dd4f83..bbf26de 100644 --- a/src/app/src/App.vue +++ b/src/app/src/App.vue @@ -57,6 +57,16 @@ export default { } } }, + async created () { + try { + await this.$auth.renewTokens() + } catch (e) { + if (e !== 'Not logged in') { + // eslint-disable-next-line + console.log(e) + } + } + }, mounted () { this.progress.events.$on('show', this.showProgress) this.progress.events.$on('done', this.hideProgress) @@ -103,10 +113,10 @@ export default {