Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(env): implement unified file loading in console-web #355

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

ygrishajev
Copy link
Contributor

refs #313

@ygrishajev ygrishajev force-pushed the feature/env branch 2 times, most recently from 80be547 to 0f940c6 Compare September 5, 2024 12:27
@@ -0,0 +1,13 @@
export async function register() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how we can run validation once on server start up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -10,6 +10,16 @@ const withPWA = require("next-pwa")({
});
const { withSentryConfig } = require("@sentry/nextjs");

try {
const { browserEnvSchema } = require("./env-config.schema");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is compiled as a part of a build npm script. So it is expected to only be present at docker build time. Or anytime the command is executed off

Copy link
Contributor

@baktun14 baktun14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

AUTH0_CLIENT_ID: z.string(),
AUTH0_CLIENT_SECRET: z.string(),
AUTH0_AUDIENCE: z.string(),
AUTH0_SCOPE: z.string()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have AUTH0_M2M_DOMAIN, AUTH0_M2M_CLIENT_ID and AUTH0_M2M_CLIENT_SECRET locally, do we need them? @Redm4x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't find not where they used, nor here https://auth0.github.io/nextjs-auth0/types/config.ConfigParameters.html

are they needed? seems like it all works without them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait a min, found them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but again, they are not set in prod or staging. Are the needed?

@@ -0,0 +1,13 @@
export async function register() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ygrishajev ygrishajev merged commit 12f282a into main Sep 6, 2024
5 checks passed
@ygrishajev ygrishajev deleted the feature/env branch September 6, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants