# Oauth2 configuration

### Available environment variables

#### Server settings

```
NODE_ENV=
PORT=
APP_URL=

AUTH_FIRST_CLIENT_ID=
AUTH_FIRST_CLIENT_SECRET=
AUTH_FIRST_CLIENT_URL=
AUTH_FIRST_CLIENT_LOGIN_CODE=

TEST_CERTS=
```

#### Cookies

```
SESSION_SECRET=
COOKIE_SECURE_OFF=
```

#### Email settings

```
MAIL_SERVER_URL=
MAIL_SERVER_PORT=
MAIL_SERVER_SECURE=
MAIL_SERVER_PASSWORD=
MAIL_SERVER_USER_NAME=
EMAIL_ASSETS_URL=
FROM_NAME=
FROM_EMAIL=
```

#### MySQL

```
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_HOST=
```

#### Mongo

```
MONGO_DB_HOST=
MONGO_DB_PORT=
```

#### API

```
API_URL=
```

#### Frontend

```
FRONTEND_URL=
```

### Custom SMTP configuration per site

If you want to configure the SMTP server through which e-mails are sent on a site-by-site basis, this is possible through configuration in the database. Under the `clients` table in the `config` column you can set the following parameters:

```
"smtpTransport": {
    "host": "smtp.gmail.com",
    "port": 465,
    "secure": true,
    "auth": {
        "user": "username@gmail.com",
        "pass": "password"
    }
}
```
