api/utils/db.py
def authenticate(
    token: Optional[HTTPAuthorizationCredentials] = Depends(auth),
) -> Optional[str]:
    """If a token is provided, return the email, else return None"""
    if token:
        return email_from_id_token(token.credentials)
    return None
If a token is provided, return the email, else return None
If a token is provided, return the email, else return None
If a token is provided return the email else return None
def authenticate(
    token: Optional[HTTPAuthorizationCredentials] = Depends(auth),
) -> Optional[str]:
    if token:
        return email_from_id_token(token.credentials)
    return None
def authenticate ( token : Optional [ HTTPAuthorizationCredentials ] = Depends ( auth ) , ) -> Optional [ str ] : if token : return email_from_id_token ( token . credentials ) return None
If a token is provided, return the email, else return None
If a token is provided return the email else return None
"""If a token is provided, return the email, else return None"""
token
Optional[HTTPAuthorizationCredentials]