feat(demo): add auth flow UI service

This commit is contained in:
2026-07-14 10:12:22 +03:30
parent e382c4f93a
commit d43eb54e2d
16 changed files with 895 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
from gapido_auth.infrastructure.debug_sms_client import DebugSmsClient, debug_sms_key
class FakeDebugStore:
def __init__(self) -> None:
self.values: dict[str, tuple[int, str]] = {}
async def setex(self, name: str, time: int, value: str) -> object:
self.values[name] = (time, value)
return True
async def test_debug_sms_client_stores_latest_otp() -> None:
store = FakeDebugStore()
client = DebugSmsClient(store, ttl_seconds=300)
await client.send_otp("989120000000", "123456", "debug-otp")
assert store.values[debug_sms_key("989120000000")] == (300, "123456")