Update main.py
Browse files
main.py
CHANGED
@@ -19,14 +19,14 @@ from authlib.integrations.starlette_client import OAuth
|
|
19 |
from starlette.middleware.sessions import SessionMiddleware
|
20 |
|
21 |
my_secret_key = os.environ['my_secret_key']
|
22 |
-
|
23 |
from fastapi.staticfiles import StaticFiles
|
24 |
from authlib.integrations.starlette_client import OAuth
|
25 |
|
26 |
app = FastAPI()
|
27 |
|
28 |
oauth = OAuth(app)
|
29 |
-
app.add_middleware(SessionMiddleware, secret_key=
|
30 |
# Configure OAuth registry
|
31 |
oauth.register(
|
32 |
name='google',
|
|
|
19 |
from starlette.middleware.sessions import SessionMiddleware
|
20 |
|
21 |
my_secret_key = os.environ['my_secret_key']
|
22 |
+
SECRET_KEY = os.getenv('SecretKey', 'default_secret')
|
23 |
from fastapi.staticfiles import StaticFiles
|
24 |
from authlib.integrations.starlette_client import OAuth
|
25 |
|
26 |
app = FastAPI()
|
27 |
|
28 |
oauth = OAuth(app)
|
29 |
+
app.add_middleware(SessionMiddleware, secret_key=SECRET_KEY)
|
30 |
# Configure OAuth registry
|
31 |
oauth.register(
|
32 |
name='google',
|