Skip /oidc/login in catch-all so Nuxt renders the login page
The server catch-all route was intercepting /oidc/login and passing it to oidc-provider, which returned 404. Now it falls through to the Vue page router instead.
This commit is contained in:
parent
025c1a180f
commit
3187b5118b
1 changed files with 6 additions and 0 deletions
|
|
@ -11,6 +11,12 @@
|
|||
import { getOidcProvider } from "../../utils/oidc-provider.js";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
// Let Nuxt handle the /oidc/login page (Vue SPA route)
|
||||
const path = event.path || getRequestURL(event).pathname;
|
||||
if (path === "/oidc/login" || path.startsWith("/oidc/login?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
const provider = await getOidcProvider();
|
||||
const { req, res } = event.node;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue