I have a feeling there is a bug in the new element...
# general
h
I have a feeling there is a bug in the new elements ui. i've enabled it and set global redirect to
/
in Ory Network, login is set to
/dashboard
and "so on".. i've made a tunnel with the cli with
ory tunnel <http://localhost:3000>
after enabling the new UI in Ory Network, the login redirects to
localhost:4000
instead of my
/dashboard
on
localhost:3000
the
legacy UI
works fine.
b
h
👍 it's named proxy.ts now. But I will try that.
I just looked i do have that setup you linked to Jonas 🙂 Just in a new nextjs setup.
Copy code
import {createOryMiddleware} from "@ory/nextjs/middleware"
import oryConfig from "@/ory.config"

export const proxy = createOryMiddleware(oryConfig)

export const config = {
  matcher: [
    // Match all paths except static files and Next.js internals
    "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
  ],
};
and my ory.config.ts:
Copy code
import type { OryClientConfiguration } from "@ory/elements-react"

const config: OryClientConfiguration = {
  sdk: {
    url: process.env.NEXT_PUBLIC_ORY_SDK_URL,
  },
  project: {
    default_locale: "en",
    default_redirect_url: "/dashboard",
    error_ui_url: "/error",
    locale_behavior: "force_default",
    name: "Example Coffee",
    registration_enabled: true,
    verification_enabled: true,
    recovery_enabled: true,
    registration_ui_url: "/registration",
    verification_ui_url: "/verification",
    recovery_ui_url: "/recovery",
    login_ui_url: "/login",
    settings_ui_url: "/settings",
  },
}

export default config
I wonder if the
export const
is wrong?? seems like the "new" way is
export function
? https://nextjs.org/docs/app/api-reference/file-conventions/proxy
dno if there are plans to upgrade the examples to nextjs 16 from nextjs 15.
b
It definitely, is but unfortunately we're currently stuck with 15 because of a dependency. It shouldn't block you from using next.js 16, though. You mentioned, that you used the ory tunnel? You don't need the tunnel if you're using the middleware (they do the same thing)
h
ya i use the tunnel. i don't expect the public url works when i use
localhost:3000