feat(sms): add selectable provider strategy

This commit is contained in:
2026-07-14 09:45:40 +03:30
parent 2264b7fc95
commit e382c4f93a
10 changed files with 171 additions and 12 deletions

View File

@@ -14,6 +14,7 @@ from gapido_auth.infrastructure.mongo_repositories import (
)
from gapido_auth.infrastructure.rabbitmq import RabbitMqSmsPublisher
from gapido_auth.infrastructure.redis_otp_store import RedisOtpStore
from gapido_auth.infrastructure.sms_provider import get_sms_template
@dataclass(slots=True)
@@ -53,8 +54,7 @@ async def build_auth_service(settings: Settings, rabbitmq_channel: AbstractChann
otp_request_limit=settings.otp_request_limit,
otp_request_window_seconds=settings.otp_request_window_seconds,
refresh_token_ttl_seconds=settings.refresh_token_ttl_seconds,
sms_template=settings.kavenegar_login_template,
sms_template=get_sms_template(settings),
),
)
return AppContainer(auth_service=auth_service, mongo_client=mongo_client, redis=redis)