Gregniuki commited on
Commit
1b47f41
1 Parent(s): 73275a8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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
- SECRET_KEY1 = os.environ['SecretKey']
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_KEY1)
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',