File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,8 @@ REDIS_HOST=redis
77REDIS_PORT = 6379
88REDIS_URL = redis://redis:6379/0
99# MongoDB
10- MONGODB_URL = mongodb://mongo:27017
10+ MONGODB_URL = mongodb://mongo:27017
11+ # Secrets
12+ SECRET_KEY = " YourSecretKeyHere"
13+ ALGORITHM = " HS256"
14+ ACCESS_TOKEN_EXPIRE_MINUTES = 30
Original file line number Diff line number Diff line change 1+ import os
12from datetime import UTC , datetime , timedelta
23from typing import Annotated
34
1314
1415# to get a string like this run:
1516# openssl rand -hex 32
16- SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
17- ALGORITHM = "HS256"
18- ACCESS_TOKEN_EXPIRE_MINUTES = 30
17+ SECRET_KEY = os . environ . get ( "SECRET_KEY" )
18+ ALGORITHM = os . environ . get ( "ALGORITHM" )
19+ ACCESS_TOKEN_EXPIRE_MINUTES = os . environ . get ( "ACCESS_TOKEN_EXPIRE_MINUTES" )
1920
2021router = APIRouter ()
2122
Original file line number Diff line number Diff line change 1+ import os
12from datetime import UTC , datetime , timedelta
23from typing import Annotated
34
1718
1819# to get a string like this run:
1920# openssl rand -hex 32
20- SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
21- ALGORITHM = "HS256"
22- ACCESS_TOKEN_EXPIRE_MINUTES = 30
21+ SECRET_KEY = os . environ . get ( "SECRET_KEY" )
22+ ALGORITHM = os . environ . get ( "ALGORITHM" )
23+ ACCESS_TOKEN_EXPIRE_MINUTES = os . environ . get ( "ACCESS_TOKEN_EXPIRE_MINUTES" )
2324
2425router = APIRouter ()
2526
You can’t perform that action at this time.
0 commit comments