mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 05:27:54 -05:00
Merge pull request #87 from Pythagora-io/feature/fill-secrets-env
feature/fill-secrets-env
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user