diff --git a/.env.template b/.env.template
new file mode 100644
index 0000000..7cf6e5c
--- /dev/null
+++ b/.env.template
@@ -0,0 +1,5 @@
+ORY_SDK_URL=http://localhost:4433
+HYDRA_ADMIN_URL=http://localhost:4445
+HYDRA_PUBLIC_URL=http://localhost:4444
+BASE_PATH=/kratos-ui
+NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433
\ No newline at end of file
diff --git a/pages/_app.tsx b/pages/_app.tsx
index d0dc0ac..aee98ce 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,6 +1,7 @@
import "../styles/globals.css"
import { theme, globalStyles, ThemeProps } from "@ory/themes"
import type { AppProps } from "next/app"
+import Head from "next/head"
import { ToastContainer } from "react-toastify"
import "react-toastify/dist/ReactToastify.css"
import { ThemeProvider } from "styled-components"
@@ -13,6 +14,9 @@ const GlobalStyle = createGlobalStyle((props: ThemeProps) =>
function MyApp({ Component, pageProps }: AppProps) {
return (
+
+
+
diff --git a/pages/api/.ory/[...paths].ts b/pages/api/.ory/[...paths].ts
deleted file mode 100644
index 3effe99..0000000
--- a/pages/api/.ory/[...paths].ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// @ory/integrations offers a package for integrating with NextJS.
-import { config, createApiHandler } from "@ory/integrations/next-edge"
-
-// We need to export the config.
-export { config }
-
-// And create the Ory Cloud API "bridge".
-export default createApiHandler({
- fallbackToPlayground: true,
- // Because vercel.app is a public suffix and setting cookies for
- // vercel.app is not possible.
- dontUseTldForCookieDomain: true,
- // we require this since we are proxying the Ory requests through nextjs
- // Ory needs to know about our host to generate the correct urls for redirecting back between flows
- // For example between Login MFA and Settings
- forwardAdditionalHeaders: ["x-forwarded-host"],
-})
diff --git a/pkg/styled/index.tsx b/pkg/styled/index.tsx
index b3afb70..ca2c9b6 100644
--- a/pkg/styled/index.tsx
+++ b/pkg/styled/index.tsx
@@ -113,7 +113,7 @@ export const DocsButton = ({
onClick={onClick}
disabled={disabled}
data-testid={testid}
- href={href}
+ href={process.env.BASE_PATH + href}
>
{title}