Schroedinger-Hat / peoplez

Peoplez is an open-source, self-hosted organisation management software that allows you to manage basic needs of your nonprofit organisation
GNU Affero General Public License v3.0
6 stars 2 forks source link

Why discord is required? #20

Open Wabri opened 5 months ago

Wabri commented 5 months ago

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

> peoplez@0.1.0 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
TheJoin95 commented 5 months ago

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 commented 5 months ago

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