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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,4 +1,7 @@
1
- import os
 
 
 
2
  from fastapi.security import OAuth2PasswordBearer
3
  from pydantic import BaseModel
4
  from sqlalchemy.orm import Session
@@ -8,15 +11,12 @@ from passlib.context import CryptContext
8
  from datetime import datetime, timedelta
9
  import jwt
10
  from emailx import send_verification_email, generate_verification_token
11
- from fastapi import FastAPI, Depends, HTTPException, Request, Form, status
12
- from fastapi.responses import RedirectResponse, HTMLResponse
13
- from fastapi.templating import Jinja2Templates
14
 
15
  from fastapi.staticfiles import StaticFiles
16
 
17
  from typing import Optional
18
  import httpx
19
-
20
  from starlette.middleware.sessions import SessionMiddleware
21
  import authlib
22
 
@@ -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(app)
36
 
37
  # Password context
38
  pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
 
1
+
2
+ from fastapi import FastAPI, Depends, HTTPException, Request, Form, status
3
+ from fastapi.responses import RedirectResponse, HTMLResponse
4
+ from fastapi.templating import Jinja2Templates
5
  from fastapi.security import OAuth2PasswordBearer
6
  from pydantic import BaseModel
7
  from sqlalchemy.orm import Session
 
11
  from datetime import datetime, timedelta
12
  import jwt
13
  from emailx import send_verification_email, generate_verification_token
 
 
 
14
 
15
  from fastapi.staticfiles import StaticFiles
16
 
17
  from typing import Optional
18
  import httpx
19
+ import os
20
  from starlette.middleware.sessions import SessionMiddleware
21
  import authlib
22
 
 
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")