Skip to content

Commit

Permalink
Update Vite to 5.0.0
Browse files Browse the repository at this point in the history
Vite 5 does not allow us to serve /oidc-callback (or
/oidc-silent-redirect) as a Vue route on index.html because we have
.html files with the same name. As the .html files are used for IdP
configurations everywhere we decided to change the route name instead.
  • Loading branch information
dschmidt committed Nov 16, 2023
1 parent 36d3033 commit 0adaef7
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 453 deletions.
2 changes: 1 addition & 1 deletion oidc-callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
window.onload = function () {
const base = document.querySelector('base')
const path = base ? new URL(base.href).pathname.split('/') : [...window.location.pathname.split('/').slice(0, -1), 'index.html#']
const url = new URL([...path, 'oidc-callback'].filter(Boolean).join('/'), window.location.origin)
const url = new URL([...path, 'web-oidc-callback'].filter(Boolean).join('/'), window.location.origin)
window.location.href = url.href + window.location.search
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion oidc-silent-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
window.onload = function () {
const base = document.querySelector('base')
const path = base ? new URL(base.href).pathname.split('/') : [...window.location.pathname.split('/').slice(0, -1), 'index.html#']
const url = new URL([...path, 'oidc-silent-redirect'].filter(Boolean).join('/'), window.location.origin)
const url = new URL([...path, 'web-oidc-silent-redirect'].filter(Boolean).join('/'), window.location.origin)
window.location.href = url.href + window.location.search
}
</script>
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@vue/compiler-dom": "3.3.4",
"@vue/compiler-sfc": "3.3.4",
"@vue/runtime-dom": "3.3.4",
"connect-history-api-fallback": "^2.0.0",
"keycode": "^2.2.1",
"rollup-plugin-gzip": "^3.1.0",
"vite-plugin-static-copy": "^0.16.0",
Expand Down Expand Up @@ -113,7 +112,7 @@
"tslib": "2.5.0",
"typescript": "5.0.3",
"url-search-params-polyfill": "8.1.1",
"vite": "4.4.9",
"vite": "5.0.0",
"vite-plugin-environment": "^1.1.3",
"vue-tsc": "1.8.10",
"vue3-gettext": "2.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"rollup-plugin-serve": "^2.0.2"
},
"peerDependencies": {
"vite": "^4.1.1",
"vite": "^5.0.0",
"sass": "^1.62.1"
}
}
4 changes: 2 additions & 2 deletions packages/web-runtime/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export const router = patchRouter(
meta: { title: $gettext('Logout'), authContext: 'anonymous' }
},
{
path: '/oidc-callback',
path: '/web-oidc-callback',
name: 'oidcCallback',
component: OidcCallbackPage,
meta: { title: $gettext('Oidc callback'), authContext: 'anonymous' }
},
{
path: '/oidc-silent-redirect',
path: '/web-oidc-silent-redirect',
name: 'oidcSilentRedirect',
component: OidcCallbackPage,
meta: { title: $gettext('Oidc redirect'), authContext: 'anonymous' }
Expand Down
Loading

0 comments on commit 0adaef7

Please sign in to comment.