-
Notifications
You must be signed in to change notification settings - Fork 56
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
Conversation
80be547
to
0f940c6
Compare
@@ -0,0 +1,13 @@ | |||
export async function register() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
0f940c6
to
20ebd93
Compare
There was a problem hiding this 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() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
20ebd93
to
2019fa2
Compare
refs #313