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

Why discord is required? #20

Closed
Wabri opened this issue Apr 6, 2024 · 3 comments
Closed

Why discord is required? #20

Wabri opened this issue Apr 6, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Wabri
Copy link
Member

Wabri commented Apr 6, 2024

I didnt set these two variables in the .env file:

# Next Auth Discord Provider
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""

Should I do that?

Is this error caused by that?

❯ npm run dev

> [email protected] dev
> next dev

❌ Invalid environment variables: {
  DISCORD_CLIENT_ID: [ 'Required' ],
  DISCORD_CLIENT_SECRET: [ 'Required' ],
  MARKETING_NAME: [ 'Required' ],
  MARKETING_WEBSITE_URL: [ 'Required' ],
  STRIPE_PRIVATE_KEY: [ 'Required' ],
  STRIPE_PRICES_LOOKUP_KEY: [ 'Required' ],
  EMAIL_SERVER_HOST: [ 'Required' ],
  EMAIL_SERVER_PORT: [ 'Expected number, received nan' ],
  EMAIL_SERVER_USER: [ 'Required' ],
  EMAIL_SERVER_PASSWORD: [ 'Required' ],
  EMAIL_FROM: [ 'Required' ]
}
file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/node_modules/@t3-oss/env-core/dist/index.js:29
        throw new Error("Invalid environment variables");
              ^

Error: Invalid environment variables
    at onValidationError (file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/node_modules/@t3-oss/env-core/dist/index.js:29:15)
    at createEnv (file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/node_modules/@t3-oss/env-core/dist/index.js:35:16)
    at createEnv (file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
    at file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/src/env.js:4:20
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async file:///home/wabri/Workspaces/Github-Wabri/SH/peoplez/wt1/next.config.js:2:1

Node.js v20.12.0
@Wabri Wabri added the bug Something isn't working label Apr 6, 2024
@TheJoin95
Copy link
Member

I do believe that you need to setup those env constants. Maybe a documentation on that or where to find the secrets could be good tho

@LobeTia
Copy link
Contributor

LobeTia commented Apr 8, 2024

The error is caused by missing credentials in config.

Env variable validation is quite aggressive for the moment, we should gracefully disable functionality based on missing env configuration
For this particular issue, Discord is required in order to SSO into the admin portal

@davideimola davideimola added question Further information is requested and removed bug Something isn't working labels Apr 16, 2024
@TheJoin95
Copy link
Member

Closing this as discord is not required anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants