diff --git a/flatnotes/auth.py b/flatnotes/auth.py index ff426fc..b91d974 100644 --- a/flatnotes/auth.py +++ b/flatnotes/auth.py @@ -23,10 +23,11 @@ def create_access_token(data: dict): return encoded_jwt -async def validate_token(token: str = Depends(oauth2_scheme)): +async def validate_token(): if config.auth_type == AuthType.NONE: return try: + token = Depends(oauth2_scheme) payload = jwt.decode( token, config.session_key, algorithms=[JWT_ALGORITHM] )