Update app.py
Browse files
app.py
CHANGED
@@ -20,16 +20,15 @@ import os
|
|
20 |
|
21 |
|
22 |
# Environment variables
|
23 |
-
SECRET_KEY1 = os.getenv('SECRET_KEY', 'default_secret')
|
24 |
GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID')
|
25 |
GOOGLE_CLIENT_SECRET = os.getenv('GOOGLE_CLIENT_SECRET')
|
26 |
-
SECRET_KEY = os.environ['
|
27 |
ALGORITHM = "HS256"
|
28 |
ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
29 |
|
30 |
# FastAPI and OAuth setup
|
31 |
app = FastAPI()
|
32 |
-
app.add_middleware(SessionMiddleware, secret_key=
|
33 |
oauth = OAuth(app)
|
34 |
# Password context
|
35 |
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
|
|
20 |
|
21 |
|
22 |
# Environment variables
|
|
|
23 |
GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID')
|
24 |
GOOGLE_CLIENT_SECRET = os.getenv('GOOGLE_CLIENT_SECRET')
|
25 |
+
SECRET_KEY = os.environ['SECRET_KEY']
|
26 |
ALGORITHM = "HS256"
|
27 |
ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
28 |
|
29 |
# FastAPI and OAuth setup
|
30 |
app = FastAPI()
|
31 |
+
app.add_middleware(SessionMiddleware, secret_key=SECRET_KEY)
|
32 |
oauth = OAuth(app)
|
33 |
# Password context
|
34 |
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|