From 89f757ca982ae733c876f5ddeaadf9696476421c Mon Sep 17 00:00:00 2001 From: JonaKl <147399846+JonaKl@users.noreply.github.com> Date: Sun, 14 Apr 2024 13:50:47 +0200 Subject: [PATCH 1/6] corrected port to 8081 --- quasar.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quasar.config.js b/quasar.config.js index 8550dda..2dac4fa 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -96,7 +96,7 @@ module.exports = configure(function (/* ctx */) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer devServer: { // https: true - port: 8080, // default: 3000; changed to 8080 to match keycloak settings + port: 8081, // default: 3000; changed to 8081 to match keycloak settings open: true // opens browser window automatically }, From 91f8ef9d3a037a93cc1e98f8ae3165362f705125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jona=20Kl=C3=A4=C3=9F?= Date: Wed, 1 May 2024 20:26:18 +0200 Subject: [PATCH 2/6] extracted frontend port --- quasar.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quasar.config.js b/quasar.config.js index 5806b3f..488e6c0 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -11,6 +11,7 @@ const { configure } = require('quasar/wrappers'); const path = require('path'); +const frontendPort = 8080; module.exports = configure(function (/* ctx */) { return { @@ -67,7 +68,7 @@ module.exports = configure(function (/* ctx */) { //Defined in realm_export.json, initialize_keycloak.sh and quasar.config.js PORT_KEYCLOAK:8083, - PORT_FRONTEND:8080, + PORT_FRONTEND:frontendPort, PORT_BACKEND:8081, }, // rawDefine: {} @@ -106,11 +107,11 @@ module.exports = configure(function (/* ctx */) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer devServer: { // https: true - port: 8080, // default: 3000; changed to 8080 to match keycloak settings + port: frontendPort, // default: 3000; changed to 8080 to match keycloak settings open: true, // opens browser window automatically proxy: { '/api': { - target: 'http://localhost:8080', + target: 'http://localhost:' + frontendPort, changeOrigin: true } }, From 68dae3ea3f6fd8da703e4187a7500c2839b56e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jona=20Kl=C3=A4=C3=9F?= Date: Wed, 1 May 2024 20:26:24 +0200 Subject: [PATCH 3/6] new app-vite version (no vulnerabilities anymore) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a3ca0b..eed6fe4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@intlify/vite-plugin-vue-i18n": "^3.3.1", - "@quasar/app-vite": "^1.8.0", + "@quasar/app-vite": "^1.8.5", "@quasar/cli": "^2.4.0", "@types/node": "^12.20.21", "@typescript-eslint/eslint-plugin": "^5.10.0", From cb68ec0d351ffe23e1395f678aa8984c0199fe4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jona=20Kl=C3=A4=C3=9F?= Date: Wed, 1 May 2024 20:48:20 +0200 Subject: [PATCH 4/6] added login function --- src/components/ProtectedData.vue | 20 +++++++++++------ src/main.ts | 38 ++++++++++++++++++++------------ src/pages/IndexPage.vue | 2 +- src/stores/keycloakStore.ts | 4 +++- 4 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/components/ProtectedData.vue b/src/components/ProtectedData.vue index de4c72d..f123af5 100644 --- a/src/components/ProtectedData.vue +++ b/src/components/ProtectedData.vue @@ -1,7 +1,8 @@ @@ -52,6 +57,7 @@ export default defineComponent({

{{ user.username }}

{{ user.keycloakID }}

+