Switch to cognito user/password authentication. Major code refactor - Fix 2
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m25s

This commit is contained in:
2025-05-16 13:00:09 -05:00
parent c4f19999dc
commit 658f7998ef
4 changed files with 58 additions and 6 deletions

View File

@@ -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:
"""