Merge pull request #87 from Pythagora-io/feature/fill-secrets-env

feature/fill-secrets-env
This commit is contained in:
LeonOstrez
2025-02-10 14:46:03 +00:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import secrets
from uuid import uuid4
from core.agents.base import BaseAgent
@@ -57,6 +58,8 @@ class Frontend(FileDiffMixin, BaseAgent):
)
options = {
"auth": auth_needed.button == "yes",
"jwt_secret": secrets.token_hex(32),
"refresh_token_secret": secrets.token_hex(32),
}
self.next_state.knowledge_base["user_options"] = options
self.state_manager.user_options = options

View File

@@ -3,5 +3,5 @@ PORT=3000
# MongoDB database URL (example: mongodb://localhost/dbname)
DATABASE_URL=mongodb://localhost/pythagora # INPUT_REQUIRED {Add your database URL here}
JWT_SECRET=some_super_secret_string # INPUT_REQUIRED {Add your JWT secret here}
REFRESH_TOKEN_SECRET=another_super_secret_string # INPUT_REQUIRED {Add your refresh token secret here}
JWT_SECRET={{ options.jwt_secret }}
REFRESH_TOKEN_SECRET={{ options.refresh_token_secret }}