Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ from typing import Optional
|
|
18 |
import httpx
|
19 |
import os
|
20 |
from starlette.middleware.sessions import SessionMiddleware
|
21 |
-
import
|
22 |
|
23 |
|
24 |
|
@@ -32,7 +32,7 @@ ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
|
32 |
# FastAPI and OAuth setup
|
33 |
app = FastAPI()
|
34 |
app.add_middleware(SessionMiddleware, secret_key=SECRET_KEY)
|
35 |
-
oauth = OAuth()
|
36 |
|
37 |
# Password context
|
38 |
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
|
|
18 |
import httpx
|
19 |
import os
|
20 |
from starlette.middleware.sessions import SessionMiddleware
|
21 |
+
from authlib.integrations.starlette_client import OAuth
|
22 |
|
23 |
|
24 |
|
|
|
32 |
# FastAPI and OAuth setup
|
33 |
app = FastAPI()
|
34 |
app.add_middleware(SessionMiddleware, secret_key=SECRET_KEY)
|
35 |
+
oauth = OAuth(app)
|
36 |
|
37 |
# Password context
|
38 |
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|