Switch to cognito user/password authentication. Major code refactor - Fix 2
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m25s
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m25s
This commit is contained in:
@@ -7,8 +7,10 @@ from fastapi.security import OAuth2PasswordBearer
|
||||
from app.auth.cognito import get_user_from_token
|
||||
from app.models.auth import CognitoUser
|
||||
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="signin")
|
||||
|
||||
oauth2_scheme = OAuth2PasswordBearer(
|
||||
tokenUrl="signin",
|
||||
scheme_name="Bearer"
|
||||
)
|
||||
|
||||
def get_current_user(token: str = Depends(oauth2_scheme)) -> CognitoUser:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user