diff --git a/backend/app/admin/service/auth_service.py b/backend/app/admin/service/auth_service.py index e8ac7d1f..859b22d1 100644 --- a/backend/app/admin/service/auth_service.py +++ b/backend/app/admin/service/auth_service.py @@ -99,8 +99,6 @@ class AuthService: """ user = None try: - user, days_remaining = await self.user_verify(db, obj.username, obj.password) - await load_login_config(db) if settings.LOGIN_CAPTCHA_ENABLED: if not obj.uuid or not obj.captcha: @@ -112,6 +110,7 @@ class AuthService: raise errors.CustomError(error=CustomErrorCode.CAPTCHA_ERROR) await redis_client.delete(f'{settings.LOGIN_CAPTCHA_REDIS_PREFIX}:{obj.uuid}') + user, days_remaining = await self.user_verify(db, obj.username, obj.password) await user_dao.update_login_time(db, obj.username) await db.refresh(user) access_token_data = await create_access_token(