Compare commits
3 Commits
3f85e24ecd
...
1e9bc4d2cc
Author | SHA1 | Date | |
---|---|---|---|
1e9bc4d2cc | |||
e98e5a0d2f | |||
21e34d6d54 |
|
@ -51,7 +51,7 @@
|
||||||
"@fortawesome/vue-fontawesome": "3.0.5",
|
"@fortawesome/vue-fontawesome": "3.0.5",
|
||||||
"@github/hotkey": "3.1.0",
|
"@github/hotkey": "3.1.0",
|
||||||
"@infectoone/vue-ganttastic": "2.2.0",
|
"@infectoone/vue-ganttastic": "2.2.0",
|
||||||
"@intlify/unplugin-vue-i18n": "1.6.0",
|
"@intlify/unplugin-vue-i18n": "2.0.0",
|
||||||
"@kyvg/vue3-notification": "3.1.2",
|
"@kyvg/vue3-notification": "3.1.2",
|
||||||
"@sentry/tracing": "7.88.0",
|
"@sentry/tracing": "7.88.0",
|
||||||
"@sentry/vue": "7.88.0",
|
"@sentry/vue": "7.88.0",
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
"vite-plugin-sentry": "1.3.0",
|
"vite-plugin-sentry": "1.3.0",
|
||||||
"vite-svg-loader": "5.1.0",
|
"vite-svg-loader": "5.1.0",
|
||||||
"vitest": "1.1.0",
|
"vitest": "1.1.0",
|
||||||
"vue-tsc": "1.8.25",
|
"vue-tsc": "1.8.26",
|
||||||
"wait-on": "7.2.0",
|
"wait-on": "7.2.0",
|
||||||
"workbox-cli": "7.0.0"
|
"workbox-cli": "7.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,8 +29,8 @@ dependencies:
|
||||||
specifier: 2.2.0
|
specifier: 2.2.0
|
||||||
version: 2.2.0(dayjs@1.11.10)(vue@3.3.13)
|
version: 2.2.0(dayjs@1.11.10)(vue@3.3.13)
|
||||||
'@intlify/unplugin-vue-i18n':
|
'@intlify/unplugin-vue-i18n':
|
||||||
specifier: 1.6.0
|
specifier: 2.0.0
|
||||||
version: 1.6.0(rollup@4.9.1)(vue-i18n@9.8.0)
|
version: 2.0.0(rollup@4.9.1)(vue-i18n@9.8.0)
|
||||||
'@kyvg/vue3-notification':
|
'@kyvg/vue3-notification':
|
||||||
specifier: 3.1.2
|
specifier: 3.1.2
|
||||||
version: 3.1.2(vue@3.3.13)
|
version: 3.1.2(vue@3.3.13)
|
||||||
|
@ -3826,8 +3826,8 @@ packages:
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@intlify/unplugin-vue-i18n@1.6.0(rollup@4.9.1)(vue-i18n@9.8.0):
|
/@intlify/unplugin-vue-i18n@2.0.0(rollup@4.9.1)(vue-i18n@9.8.0):
|
||||||
resolution: {integrity: sha512-IGeFNWxdEvB12E/3Y/+nmIsGeTg5okPsK1XEtUUD/DdkHbVqUbJucMpHKeHF8Px55Qca551pQCs/g+VjNUt6KA==}
|
resolution: {integrity: sha512-1oKvm92L9l2od2H9wKx2ZvR4tzn7gUtd7bPLI7AWUmm7U9H1iEypndt5d985ypxGsEs0gToDaKTrytbBIJwwSg==}
|
||||||
engines: {node: '>= 14.16'}
|
engines: {node: '>= 14.16'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
petite-vue-i18n: '*'
|
petite-vue-i18n: '*'
|
||||||
|
@ -3844,7 +3844,7 @@ packages:
|
||||||
'@intlify/bundle-utils': 7.4.0(vue-i18n@9.8.0)
|
'@intlify/bundle-utils': 7.4.0(vue-i18n@9.8.0)
|
||||||
'@intlify/shared': 9.8.0
|
'@intlify/shared': 9.8.0
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@4.9.1)
|
'@rollup/pluginutils': 5.0.2(rollup@4.9.1)
|
||||||
'@vue/compiler-sfc': 3.3.10
|
'@vue/compiler-sfc': 3.3.13
|
||||||
debug: 4.3.4(supports-color@8.1.1)
|
debug: 4.3.4(supports-color@8.1.1)
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
|
@ -5130,15 +5130,6 @@ packages:
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/compiler-core@3.3.10:
|
|
||||||
resolution: {integrity: sha512-doe0hODR1+i1menPkRzJ5MNR6G+9uiZHIknK3Zn5OcIztu6GGw7u0XUzf3AgB8h/dfsZC9eouzoLo3c3+N/cVA==}
|
|
||||||
dependencies:
|
|
||||||
'@babel/parser': 7.23.5
|
|
||||||
'@vue/shared': 3.3.10
|
|
||||||
estree-walker: 2.0.2
|
|
||||||
source-map-js: 1.0.2
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/compiler-core@3.3.13:
|
/@vue/compiler-core@3.3.13:
|
||||||
resolution: {integrity: sha512-bwi9HShGu7uaZLOErZgsH2+ojsEdsjerbf2cMXPwmvcgZfVPZ2BVZzCVnwZBxTAYd6Mzbmf6izcUNDkWnBBQ6A==}
|
resolution: {integrity: sha512-bwi9HShGu7uaZLOErZgsH2+ojsEdsjerbf2cMXPwmvcgZfVPZ2BVZzCVnwZBxTAYd6Mzbmf6izcUNDkWnBBQ6A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5156,13 +5147,6 @@ packages:
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/compiler-dom@3.3.10:
|
|
||||||
resolution: {integrity: sha512-NCrqF5fm10GXZIK0GrEAauBqdy+F2LZRt3yNHzrYjpYBuRssQbuPLtSnSNjyR9luHKkWSH8we5LMB3g+4z2HvA==}
|
|
||||||
dependencies:
|
|
||||||
'@vue/compiler-core': 3.3.10
|
|
||||||
'@vue/shared': 3.3.10
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/compiler-dom@3.3.13:
|
/@vue/compiler-dom@3.3.13:
|
||||||
resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==}
|
resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5176,21 +5160,6 @@ packages:
|
||||||
'@vue/shared': 3.3.9
|
'@vue/shared': 3.3.9
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/compiler-sfc@3.3.10:
|
|
||||||
resolution: {integrity: sha512-xpcTe7Rw7QefOTRFFTlcfzozccvjM40dT45JtrE3onGm/jBLZ0JhpKu3jkV7rbDFLeeagR/5RlJ2Y9SvyS0lAg==}
|
|
||||||
dependencies:
|
|
||||||
'@babel/parser': 7.23.5
|
|
||||||
'@vue/compiler-core': 3.3.10
|
|
||||||
'@vue/compiler-dom': 3.3.10
|
|
||||||
'@vue/compiler-ssr': 3.3.10
|
|
||||||
'@vue/reactivity-transform': 3.3.10
|
|
||||||
'@vue/shared': 3.3.10
|
|
||||||
estree-walker: 2.0.2
|
|
||||||
magic-string: 0.30.5
|
|
||||||
postcss: 8.4.32
|
|
||||||
source-map-js: 1.0.2
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/compiler-sfc@3.3.13:
|
/@vue/compiler-sfc@3.3.13:
|
||||||
resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==}
|
resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5205,13 +5174,6 @@ packages:
|
||||||
postcss: 8.4.32
|
postcss: 8.4.32
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
/@vue/compiler-ssr@3.3.10:
|
|
||||||
resolution: {integrity: sha512-12iM4jA4GEbskwXMmPcskK5wImc2ohKm408+o9iox3tfN9qua8xL0THIZtoe9OJHnXP4eOWZpgCAAThEveNlqQ==}
|
|
||||||
dependencies:
|
|
||||||
'@vue/compiler-dom': 3.3.10
|
|
||||||
'@vue/shared': 3.3.10
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/compiler-ssr@3.3.13:
|
/@vue/compiler-ssr@3.3.13:
|
||||||
resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==}
|
resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5263,16 +5225,6 @@ packages:
|
||||||
vue-template-compiler: 2.7.14
|
vue-template-compiler: 2.7.14
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/reactivity-transform@3.3.10:
|
|
||||||
resolution: {integrity: sha512-0xBdk+CKHWT+Gev8oZ63Tc0qFfj935YZx+UAynlutnrDZ4diFCVFMWixn65HzjE3S1iJppWOo6Tt1OzASH7VEg==}
|
|
||||||
dependencies:
|
|
||||||
'@babel/parser': 7.23.5
|
|
||||||
'@vue/compiler-core': 3.3.10
|
|
||||||
'@vue/shared': 3.3.10
|
|
||||||
estree-walker: 2.0.2
|
|
||||||
magic-string: 0.30.5
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/reactivity-transform@3.3.13:
|
/@vue/reactivity-transform@3.3.13:
|
||||||
resolution: {integrity: sha512-oWnydGH0bBauhXvh5KXUy61xr9gKaMbtsMHk40IK9M4gMuKPJ342tKFarY0eQ6jef8906m35q37wwA8DMZOm5Q==}
|
resolution: {integrity: sha512-oWnydGH0bBauhXvh5KXUy61xr9gKaMbtsMHk40IK9M4gMuKPJ342tKFarY0eQ6jef8906m35q37wwA8DMZOm5Q==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5309,10 +5261,6 @@ packages:
|
||||||
'@vue/shared': 3.3.13
|
'@vue/shared': 3.3.13
|
||||||
vue: 3.3.13(typescript@5.3.3)
|
vue: 3.3.13(typescript@5.3.3)
|
||||||
|
|
||||||
/@vue/shared@3.3.10:
|
|
||||||
resolution: {integrity: sha512-2y3Y2J1a3RhFa0WisHvACJR2ncvWiVHcP8t0Inxo+NKz+8RKO4ZV8eZgCxRgQoA6ITfV12L4E6POOL9HOU5nqw==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@vue/shared@3.3.13:
|
/@vue/shared@3.3.13:
|
||||||
resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==}
|
resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
import {parseURL} from 'ufo'
|
|
||||||
|
|
||||||
import {createRandomID} from '@/helpers/randomId'
|
import {createRandomID} from '@/helpers/randomId'
|
||||||
import type {IProvider} from '@/types/IProvider'
|
import type {IProvider} from '@/types/IProvider'
|
||||||
|
|
||||||
export const redirectToProvider = (provider: IProvider, redirectUrl = '') => {
|
export const redirectToProvider = (provider: IProvider) => {
|
||||||
|
|
||||||
// We're not using the redirect url provided by the server to allow redirects when using the electron app.
|
// We're not using the redirect url provided by the server to allow redirects when using the electron app.
|
||||||
// The implications are not quite clear yet hence the logic to pass in another redirect url still exists.
|
// The implications are not quite clear yet hence the logic to pass in another redirect url still exists.
|
||||||
if (redirectUrl === '') {
|
const redirectUrl = `${window.location.href.replace('/login', '')}/auth/openid/`
|
||||||
const {host, protocol} = parseURL(window.location.href)
|
|
||||||
redirectUrl = `${protocol}//${host}/auth/openid/`
|
|
||||||
}
|
|
||||||
|
|
||||||
const state = createRandomID(24)
|
const state = createRandomID(24)
|
||||||
localStorage.setItem('state', state)
|
localStorage.setItem('state', state)
|
||||||
|
@ -18,7 +13,7 @@ export const redirectToProvider = (provider: IProvider, redirectUrl = '') => {
|
||||||
window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=openid email profile&state=${state}`
|
window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=openid email profile&state=${state}`
|
||||||
}
|
}
|
||||||
export const redirectToProviderOnLogout = (provider: IProvider) => {
|
export const redirectToProviderOnLogout = (provider: IProvider) => {
|
||||||
if (provider.logoutUrl.length > 0){
|
if (provider.logoutUrl.length > 0) {
|
||||||
window.location.href = `${provider.logoutUrl}`
|
window.location.href = `${provider.logoutUrl}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ function redirectToProviderIfNothingElseIsEnabled() {
|
||||||
(window.location.pathname.startsWith('/login') || window.location.pathname === '/') && // Kinda hacky, but prevents an endless loop.
|
(window.location.pathname.startsWith('/login') || window.location.pathname === '/') && // Kinda hacky, but prevents an endless loop.
|
||||||
window.location.search.includes('redirectToProvider=true')
|
window.location.search.includes('redirectToProvider=true')
|
||||||
) {
|
) {
|
||||||
redirectToProvider(auth.openidConnect.providers[0], auth.openidConnect.redirectUrl)
|
redirectToProvider(auth.openidConnect.providers[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user