Gregniuki commited on
Commit
0052143
·
1 Parent(s): 2476a51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 authlib
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")