diff --git a/.env.example b/.env.example index 165532f..9fe5fa2 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,4 @@ -PUBLIC_CORBADO_PROJECT_ID=YOUR_PROJECT_ID \ No newline at end of file +# Development environment variables +PUBLIC_CORBADO_PROJECT_ID_DEV=YOUR_PROJECT_ID +# Production environment variables +PUBLIC_CORBADO_PROJECT_ID_PROD=YOUR_PROJECT_ID \ No newline at end of file diff --git a/src/components/PasskeyList.astro b/src/components/PasskeyList.astro index ee4dfcd..c6f87f8 100644 --- a/src/components/PasskeyList.astro +++ b/src/components/PasskeyList.astro @@ -1,5 +1,7 @@ --- -const projectId = import.meta.env.PUBLIC_CORBADO_PROJECT_ID; +const projectId = import.meta.env.DEV + ? import.meta.env.PUBLIC_CORBADO_PROJECT_ID_DEV + : import.meta.env.PUBLIC_CORBADO_PROJECT_ID_PROD; ---
diff --git a/src/pages/index.astro b/src/pages/index.astro index 012103b..b9c08d4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,7 @@ --- -const projectId = import.meta.env.PUBLIC_CORBADO_PROJECT_ID; +const projectId = import.meta.env.DEV + ? import.meta.env.PUBLIC_CORBADO_PROJECT_ID_DEV + : import.meta.env.PUBLIC_CORBADO_PROJECT_ID_PROD; --- diff --git a/src/pages/profile.astro b/src/pages/profile.astro index cd73ff5..fde5487 100644 --- a/src/pages/profile.astro +++ b/src/pages/profile.astro @@ -1,6 +1,8 @@ --- import PasskeyList from "../components/PasskeyList.astro"; -const projectId = import.meta.env.PUBLIC_CORBADO_PROJECT_ID; +const projectId = import.meta.env.DEV + ? import.meta.env.PUBLIC_CORBADO_PROJECT_ID_DEV + : import.meta.env.PUBLIC_CORBADO_PROJECT_ID_PROD; ---