feat: generate secret function and replaced few instances (#7810)

This PR fixes #4588

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
ZiaCodes
2024-10-30 16:07:11 +05:00
committed by GitHub
parent 1782865ff8
commit 57d9b8e8b4
75 changed files with 2860 additions and 1531 deletions

View File

@ -50,23 +50,19 @@ Follow these steps for a manual setup.
2. **Generate Secret Tokens**
Run the following command four times to generate four unique random strings:
Run the following command to generate a unique random string:
```bash
openssl rand -base64 32
```
**Important:** Keep these tokens secure and do not share them.
**Important:** Keep this value secret / do not share it.
3. **Update the `.env`**
Replace the placeholder values in your .env file with the generated tokens:
Replace the placeholder value in your .env file with the generated token:
```ini
ACCESS_TOKEN_SECRET=first_random_string
LOGIN_TOKEN_SECRET=second_random_string
REFRESH_TOKEN_SECRET=third_random_string
FILE_TOKEN_SECRET=fourth_random_string
APP_SECRET=first_random_string
```
**Note:** Only modify these lines unless instructed otherwise.
4. **Set the Postgres Password**