diff --git a/backend/app/services/auth_service.py b/backend/app/services/auth_service.py index 293792f..ce1e4c1 100644 --- a/backend/app/services/auth_service.py +++ b/backend/app/services/auth_service.py @@ -7,8 +7,6 @@ survive server restarts. from __future__ import annotations -import asyncio -from app.utils.async_utils import run_blocking import hashlib import hmac import secrets @@ -17,6 +15,8 @@ from typing import TYPE_CHECKING import bcrypt import structlog +from app.utils.async_utils import run_blocking + if TYPE_CHECKING: import aiosqlite @@ -72,7 +72,6 @@ async def _check_password(plain: str, hashed: str) -> bool: """ plain_bytes = plain.encode() hashed_bytes = hashed.encode() - loop = asyncio.get_running_loop() return await run_blocking(lambda: bool(bcrypt.checkpw(plain_bytes, hashed_bytes)))