From 9ba610d0819cfea5f7d18431ee27b4deb97740e1 Mon Sep 17 00:00:00 2001 From: Amir Husayn Panahifar Date: Thu, 26 Nov 2026 17:57:55 +0330 Subject: [PATCH 1/3] fix(bot): re-register when the API revokes a chat's cached token The bot caches one API token per chat and reuses it forever. A newer sign-in for the same account (or a logout) revokes that token, after which every request from the chat failed and /start kept showing a dead connect code. - the client raises AuthError on 401 from upload, job and quota calls - handlers run API calls through _authed: on AuthError the cached token is dropped, the chat re-registers once and the call is retried - /start checks the cached token before showing it as the connect code - the completion poller, which has no Telegram user to re-register with, untracks the job and asks the chat to send /start - TokenStore.forget drops a chat's token --- CHANGELOG.md | 7 ++ bot/sokhan_bot/client.py | 12 +++ bot/sokhan_bot/handlers.py | 56 ++++++++++++-- bot/sokhan_bot/notify.py | 10 ++- bot/sokhan_bot/store.py | 6 ++ bot/tests/test_client_errors.py | 19 ++++- bot/tests/test_revoked_token.py | 128 ++++++++++++++++++++++++++++++++ bot/tests/test_store.py | 12 +++ 8 files changed, 243 insertions(+), 7 deletions(-) create mode 100644 bot/tests/test_revoked_token.py diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9636e..c7eb0bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/) and the proje pyproject.toml files, web/package.json, the landing site copy, the demo Space metadata and the fine-tuned model card. +### Fixed + +- The Telegram bot recovers when the API revokes the token it cached for a + chat (a newer sign-in or a logout of the same account). Every request + used to fail from then on; the bot now drops the token, re-registers + once and retries, and `/start` only shows a connect code that works. + ## [1.4.1] - 2026-11-26 ### Security diff --git a/bot/sokhan_bot/client.py b/bot/sokhan_bot/client.py index 01072d8..438ae8d 100644 --- a/bot/sokhan_bot/client.py +++ b/bot/sokhan_bot/client.py @@ -9,6 +9,10 @@ class BackendError(Exception): pass +class AuthError(BackendError): + """The API rejected the token (401): revoked by a logout or a newer sign-in.""" + + class QuotaError(BackendError): """The user's monthly allowance is exhausted (402, code=quota_exceeded).""" @@ -46,6 +50,11 @@ class SokhanClient: def _headers(self, token: str) -> dict[str, str]: return {"Authorization": f"Bearer {token}"} + @staticmethod + def _raise_for_auth(response: httpx.Response) -> None: + if response.status_code == 401: + raise AuthError("token rejected") + def register_telegram(self, telegram_id: int, username: str | None) -> str: response = self._client.post( f"{self.settings.api_base_url}/auth/telegram", @@ -64,6 +73,7 @@ class SokhanClient: files={"file": (filename, content)}, headers=self._headers(token), ) + self._raise_for_auth(response) if response.status_code == 402: detail = response.json().get("detail", {}) if detail.get("code") == "file_too_long": @@ -81,6 +91,7 @@ class SokhanClient: f"{self.settings.api_base_url}/jobs/{job_id}", headers=self._headers(token), ) + self._raise_for_auth(response) if response.status_code != 200: raise BackendError(f"job fetch failed with status {response.status_code}") return response.json() @@ -90,6 +101,7 @@ class SokhanClient: f"{self.settings.api_base_url}/quota", headers=self._headers(token), ) + self._raise_for_auth(response) if response.status_code != 200: raise BackendError(f"quota fetch failed with status {response.status_code}") return response.json() diff --git a/bot/sokhan_bot/handlers.py b/bot/sokhan_bot/handlers.py index 8982878..bb22620 100644 --- a/bot/sokhan_bot/handlers.py +++ b/bot/sokhan_bot/handlers.py @@ -3,6 +3,8 @@ import io import logging import time +from collections.abc import Callable +from typing import TypeVar from aiogram import Bot, F, Router from aiogram.filters import Command, CommandObject, CommandStart @@ -11,10 +13,17 @@ from aiogram.types import ( InlineKeyboardButton, InlineKeyboardMarkup, Message, + User, ) from sokhan_bot import texts -from sokhan_bot.client import BackendError, FileTooLongError, QuotaError, SokhanClient +from sokhan_bot.client import ( + AuthError, + BackendError, + FileTooLongError, + QuotaError, + SokhanClient, +) from sokhan_bot.split import split_message from sokhan_bot.store import TokenStore @@ -22,6 +31,8 @@ logger = logging.getLogger(__name__) _RATE_LIMIT_SECONDS = 10.0 +T = TypeVar("T") + def _job_keyboard(job_id: str, web_base_url: str) -> InlineKeyboardMarkup: return InlineKeyboardMarkup( @@ -82,10 +93,35 @@ class Handlers: self.store.set(message.chat.id, token) return token + def _authed(self, chat_id: int, user: User, call: Callable[[str], T]) -> T: + """Run `call(token)`, re-registering once if the API revoked the token. + + A web logout or a newer sign-in revokes the token cached for this + chat; without the retry every later request would fail. Raises + BackendError when the backend is unreachable or rejects again. + """ + token = self.store.get(chat_id) + if token: + try: + return call(token) + except AuthError: + logger.info("token for chat %s was revoked; re-registering", chat_id) + self.store.forget(chat_id) + token = self.client.register_telegram(user.id, user.username) + self.store.set(chat_id, token) + return call(token) + async def start(self, message: Message) -> None: token = await self._ensure_token(message) if not token: return + # The cached token doubles as the connect code, so make sure it still + # works before showing it; a backend outage keeps the cached one. + try: + self._authed(message.chat.id, message.from_user, self.client.get_quota) + except BackendError: + pass + token = self.store.get(message.chat.id) or token await message.answer(texts.WELCOME.format(connect_code=token)) async def quota(self, message: Message) -> None: @@ -93,7 +129,7 @@ class Handlers: if not token: return try: - info = self.client.get_quota(token) + info = self._authed(message.chat.id, message.from_user, self.client.get_quota) except BackendError: await message.answer(texts.SERVER_UNREACHABLE) return @@ -137,7 +173,9 @@ class Handlers: await message.answer("شناسهٔ پردازش را بنویس، مثلاً: /track 3f2a…") return try: - job = self.client.get_job(token, job_id) + job = self._authed( + message.chat.id, message.from_user, lambda t: self.client.get_job(t, job_id) + ) except BackendError: await message.answer(texts.UNKNOWN_JOB) return @@ -196,7 +234,11 @@ class Handlers: return try: - job_id = self.client.upload_audio(token, filename, content) + job_id = self._authed( + message.chat.id, + message.from_user, + lambda t: self.client.upload_audio(t, filename, content), + ) except FileTooLongError as exc: await message.answer( texts.FILE_TOO_LONG.format( @@ -229,7 +271,11 @@ class Handlers: job_id = callback.data.split(":", 1)[1] try: - job = self.client.get_job(token, job_id) + job = self._authed( + callback.message.chat.id, + callback.from_user, + lambda t: self.client.get_job(t, job_id), + ) except BackendError: await callback.answer(texts.UNKNOWN_JOB, show_alert=True) return diff --git a/bot/sokhan_bot/notify.py b/bot/sokhan_bot/notify.py index 7d248a8..09b087e 100644 --- a/bot/sokhan_bot/notify.py +++ b/bot/sokhan_bot/notify.py @@ -19,7 +19,7 @@ import time from aiogram import Bot from sokhan_bot import texts -from sokhan_bot.client import SokhanClient +from sokhan_bot.client import AuthError, SokhanClient from sokhan_bot.split import split_message from sokhan_bot.store import TokenStore @@ -75,6 +75,14 @@ class CompletionNotifier: try: job = await asyncio.to_thread(self.client.get_job, token, job_id) + except AuthError: + # Revoked by a web logout or a newer sign-in. The poller has + # no Telegram user to re-register with, so it asks for /start. + logger.warning("token for chat %s was revoked; untracking job %s", chat_id, job_id) + self.store.forget(chat_id) + self.store.untrack(job_id) + await self._send(chat_id, texts.NEED_START) + continue except Exception: logger.exception("job fetch failed (%s); will retry", job_id) continue diff --git a/bot/sokhan_bot/store.py b/bot/sokhan_bot/store.py index cc95b8a..8f7a05a 100644 --- a/bot/sokhan_bot/store.py +++ b/bot/sokhan_bot/store.py @@ -42,6 +42,12 @@ class TokenStore: self._tokens[str(chat_id)] = token self._save() + def forget(self, chat_id: int) -> None: + """Drop a chat's token, e.g. after the API revoked it.""" + with self._lock: + if self._tokens.pop(str(chat_id), None) is not None: + self._save() + def track(self, job_id: str, chat_id: int) -> None: """Watch a job so the notifier can push its transcript when it finishes.""" with self._lock: diff --git a/bot/tests/test_client_errors.py b/bot/tests/test_client_errors.py index 236f16d..4ff1722 100644 --- a/bot/tests/test_client_errors.py +++ b/bot/tests/test_client_errors.py @@ -2,7 +2,7 @@ import httpx import pytest -from sokhan_bot.client import BackendError, FileTooLongError, QuotaError, SokhanClient +from sokhan_bot.client import AuthError, BackendError, FileTooLongError, QuotaError, SokhanClient from sokhan_bot.config import BotSettings @@ -88,3 +88,20 @@ def test_get_plans_parses_catalogue(): plans = client.get_plans() assert [plan["code"] for plan in plans] == ["free", "pro"] assert plans[1]["max_file_minutes"] == 180 + + +@pytest.mark.parametrize( + "call", + [ + lambda client: client.upload_audio("tok", "voice.ogg", b"bytes"), + lambda client: client.get_job("tok", "job-1"), + lambda client: client.get_quota("tok"), + ], +) +def test_revoked_token_raises_auth_error(call): + def handler(request: httpx.Request) -> httpx.Response: + return httpx.Response(401, json={"detail": "invalid token"}) + + with _client(handler) as client: + with pytest.raises(AuthError): + call(client) diff --git a/bot/tests/test_revoked_token.py b/bot/tests/test_revoked_token.py new file mode 100644 index 0000000..bdc6770 --- /dev/null +++ b/bot/tests/test_revoked_token.py @@ -0,0 +1,128 @@ +"""The bot recovers when the API revokes a chat's cached token (web logout).""" + +import asyncio +from types import SimpleNamespace + +from sokhan_bot import texts +from sokhan_bot.client import AuthError, BackendError +from sokhan_bot.handlers import Handlers +from sokhan_bot.notify import CompletionNotifier +from sokhan_bot.store import TokenStore + + +class FakeClient: + """Accepts only `valid_token`; /auth/telegram hands out `fresh-`.""" + + def __init__(self, valid_token: str) -> None: + self.valid_token = valid_token + self.registrations = 0 + self.settings = SimpleNamespace(web_base_url="http://web.test") + + def _check(self, token: str) -> None: + if token != self.valid_token: + raise AuthError("token rejected") + + def register_telegram(self, telegram_id: int, username: str | None) -> str: + self.registrations += 1 + self.valid_token = f"fresh-{self.registrations}" + return self.valid_token + + def get_quota(self, token: str) -> dict: + self._check(token) + return { + "plan": "free", + "used_minutes": 1.0, + "limit_minutes": 30, + "remaining_minutes": 29.0, + "max_file_minutes": 10, + } + + def get_job(self, token: str, job_id: str) -> dict: + self._check(token) + return {"status": "processing", "progress": 50.0} + + +class FakeMessage: + def __init__(self, chat_id: int = 42) -> None: + self.chat = SimpleNamespace(id=chat_id) + self.from_user = SimpleNamespace(id=chat_id, username="sara") + self.answers: list[str] = [] + + async def answer(self, text: str, **_: object) -> None: + self.answers.append(text) + + +def _handlers(tmp_path, cached_token: str, client: FakeClient) -> Handlers: + store = TokenStore(str(tmp_path / "store.json")) + store.set(42, cached_token) + return Handlers(client, store) + + +def test_quota_re_registers_once_after_the_token_was_revoked(tmp_path): + client = FakeClient(valid_token="current") + handlers = _handlers(tmp_path, "revoked", client) + message = FakeMessage() + + asyncio.run(handlers.quota(message)) + + assert client.registrations == 1 + assert handlers.store.get(42) == "fresh-1" + assert message.answers and texts.SERVER_UNREACHABLE not in message.answers + + +def test_a_valid_token_is_used_without_re_registering(tmp_path): + client = FakeClient(valid_token="current") + handlers = _handlers(tmp_path, "current", client) + + asyncio.run(handlers.quota(FakeMessage())) + + assert client.registrations == 0 + assert handlers.store.get(42) == "current" + + +def test_start_shows_a_working_connect_code_after_revocation(tmp_path): + client = FakeClient(valid_token="current") + handlers = _handlers(tmp_path, "revoked", client) + message = FakeMessage() + + asyncio.run(handlers.start(message)) + + assert "fresh-1" in message.answers[-1] + assert "revoked" not in message.answers[-1] + + +def test_backend_outage_still_reports_unreachable(tmp_path): + client = FakeClient(valid_token="current") + + def unreachable(token: str) -> dict: + raise BackendError("down") + + client.get_quota = unreachable + handlers = _handlers(tmp_path, "current", client) + message = FakeMessage() + + asyncio.run(handlers.quota(message)) + + assert message.answers == [texts.SERVER_UNREACHABLE] + assert client.registrations == 0 + + +def test_poller_untracks_and_asks_for_start_when_revoked(tmp_path): + client = FakeClient(valid_token="current") + store = TokenStore(str(tmp_path / "store.json")) + store.set(42, "revoked") + store.track("job-1", 42) + sent: list[tuple[int, str]] = [] + + notifier = CompletionNotifier(bot=None, client=client, store=store) + + async def fake_send(chat_id: int, text: str) -> bool: + sent.append((chat_id, text)) + return True + + notifier._send = fake_send + asyncio.run(notifier.poll_once()) + + assert store.tracked() == [] + assert store.get(42) is None + assert sent == [(42, texts.NEED_START)] diff --git a/bot/tests/test_store.py b/bot/tests/test_store.py index 6ad6f2a..a88d192 100644 --- a/bot/tests/test_store.py +++ b/bot/tests/test_store.py @@ -47,3 +47,15 @@ def test_legacy_token_file_is_migrated(tmp_path): reloaded = TokenStore(str(path)) assert reloaded.get(123) == "legacy-token" assert [job_id for job_id, _, _ in reloaded.tracked()] == ["job-x"] + + +def test_forget_drops_a_token_and_persists(tmp_path): + path = str(tmp_path / "store.json") + store = TokenStore(path) + store.set(42, "old-token") + + store.forget(42) + store.forget(99) # unknown chats are a no-op + + assert store.get(42) is None + assert TokenStore(path).get(42) is None From 752c972669e860d3d22d16009f40cba880fa7213 Mon Sep 17 00:00:00 2001 From: Amir Husayn Panahifar Date: Thu, 26 Nov 2026 17:57:55 +0330 Subject: [PATCH 2/3] feat(auth): add POST /auth/logout to revoke the caller's token Signing out of the dashboard only forgot the token in the browser; the token itself stayed valid for anyone who had copied it. - POST /auth/logout replaces the stored hash with one of a fresh random token that is never returned, then answers 204 - an account has a single active token, so this signs out every client holding it, the same way a new sign-in already does - a revoked token is rejected by every endpoint, including token-login --- CHANGELOG.md | 3 +++ backend/sokhan/api/routes_auth.py | 18 ++++++++++++++- backend/tests/test_auth_flow.py | 37 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7eb0bc..09908de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,9 @@ The format follows [Keep a Changelog](https://keepachangelog.com/) and the proje and duration caps: 30 min on WebGPU, 10 min on WASM, 60 MB per file — no input can wedge the demo at an eternal "processing" state anymore. +- `POST /auth/logout` revokes the caller's token (204). An account has a + single active token, so it signs out every client holding it. + ### Changed - **Demo hang fix**: audio was decoded inside an `AudioContext` forced to diff --git a/backend/sokhan/api/routes_auth.py b/backend/sokhan/api/routes_auth.py index 7ea3e80..ba7af3a 100644 --- a/backend/sokhan/api/routes_auth.py +++ b/backend/sokhan/api/routes_auth.py @@ -7,15 +7,17 @@ Deliberately lightweight for v1: - POST /auth/telegram lets the bot create or resume an account per Telegram id - POST /auth/token-login lets a user paste the connect code shown by the bot to link their browser session +- POST /auth/logout revokes the caller's token """ import re -from fastapi import APIRouter, Depends, HTTPException, status +from fastapi import APIRouter, Depends, HTTPException, Response, status from pydantic import BaseModel from sqlalchemy import select from sqlalchemy.orm import Session +from sokhan.api.deps import get_current_user from sokhan.auth import generate_token, hash_password, token_hash, verify_password from sokhan.db import get_db from sokhan.models import User @@ -97,6 +99,20 @@ def token_login(payload: TokenLogin, session: Session = Depends(get_db)) -> Auth return AuthResponse(id=user.id, email=user.email, api_token=payload.api_token) +@router.post("/logout", status_code=status.HTTP_204_NO_CONTENT) +def logout(user: User = Depends(get_current_user), session: Session = Depends(get_db)) -> Response: + """Revoke the caller's token so it stops working everywhere. + + An account has a single active token, so this signs out every client + that holds it: other browsers, API scripts and, for Telegram accounts, + the bot (which re-registers on its next request). The new token is + never returned; signing in again issues a fresh one. + """ + user.token_hash = token_hash(generate_token()) + session.commit() + return Response(status_code=status.HTTP_204_NO_CONTENT) + + @router.post("/telegram", response_model=AuthResponse) def telegram_login(payload: TelegramLogin, session: Session = Depends(get_db)) -> AuthResponse: """Register-or-login used by the Telegram bot. diff --git a/backend/tests/test_auth_flow.py b/backend/tests/test_auth_flow.py index 05e1623..26b56f7 100644 --- a/backend/tests/test_auth_flow.py +++ b/backend/tests/test_auth_flow.py @@ -62,3 +62,40 @@ def test_telegram_register_or_login(client): def test_jobs_require_token(client): response = client.get("/jobs") assert response.status_code == 401 + + +def _bearer(token): + return {"Authorization": f"Bearer {token}"} + + +def test_logout_revokes_the_token(client): + token = client.post("/auth/register", json=REGISTER).json()["api_token"] + assert client.get("/quota", headers=_bearer(token)).status_code == 200 + + response = client.post("/auth/logout", headers=_bearer(token)) + + assert response.status_code == 204 + assert client.get("/quota", headers=_bearer(token)).status_code == 401 + # The revoked token is no longer a valid connect code either. + assert client.post("/auth/token-login", json={"api_token": token}).status_code == 401 + + +def test_logout_twice_with_the_same_token_is_rejected(client): + token = client.post("/auth/register", json=REGISTER).json()["api_token"] + client.post("/auth/logout", headers=_bearer(token)) + + assert client.post("/auth/logout", headers=_bearer(token)).status_code == 401 + + +def test_logout_requires_a_token(client): + assert client.post("/auth/logout").status_code == 401 + + +def test_signing_in_after_logout_issues_a_working_token(client): + first = client.post("/auth/register", json=REGISTER).json()["api_token"] + client.post("/auth/logout", headers=_bearer(first)) + + second = client.post("/auth/login", json=REGISTER).json()["api_token"] + + assert second != first + assert client.get("/quota", headers=_bearer(second)).status_code == 200 From 7a3dab88c8f4f9f0eb634fc1a4a5c889bd6c32b4 Mon Sep 17 00:00:00 2001 From: Amir Husayn Panahifar Date: Thu, 26 Nov 2026 17:57:56 +0330 Subject: [PATCH 3/3] feat(web): show the sign-in state in the header and add sign out After signing in nothing showed that you were signed in, and there was no way to sign out. - the header shows Sign in when signed out, and the account email plus Sign out when signed in (Telegram placeholder emails are not shown) - sign out calls POST /auth/logout, then clears the local session even if the API is unreachable, and goes to the login page - the landing page's sign-in button is hidden for a signed-in user, and the login page redirects them to the upload page - a useSession hook (useSyncExternalStore) keeps every component in sync across sign-in and sign-out, including other tabs --- CHANGELOG.md | 6 ++++ web/messages/en.json | 6 +++- web/messages/fa.json | 6 +++- web/src/app/[locale]/login/page.tsx | 12 ++++++-- web/src/app/[locale]/page.tsx | 8 ++--- web/src/components/login-cta.tsx | 16 ++++++++++ web/src/components/site-header.tsx | 46 ++++++++++++++++++++++++++++- web/src/lib/api.ts | 39 +++++++++++++++++++++++- web/src/lib/session.ts | 37 +++++++++++++++++++++++ 9 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 web/src/components/login-cta.tsx create mode 100644 web/src/lib/session.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 09908de..562b295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/) and the proje - `POST /auth/logout` revokes the caller's token (204). An account has a single active token, so it signs out every client holding it. +- The dashboard header shows the sign-in state: a **Sign in** button when + signed out, the account email and **Sign out** when signed in. Sign out + revokes the token on the server and works even when the API is + unreachable. The landing page's sign-in button is hidden and the login + page redirects to the upload page for a signed-in user. + ### Changed - **Demo hang fix**: audio was decoded inside an `AudioContext` forced to diff --git a/web/messages/en.json b/web/messages/en.json index a36a2bb..1b6e4ab 100644 --- a/web/messages/en.json +++ b/web/messages/en.json @@ -15,7 +15,11 @@ "new": "New transcription", "archive": "Archive", "switchToEn": "English", - "switchToFa": "فارسی" + "switchToFa": "فارسی", + "signIn": "Sign in", + "signOut": "Sign out", + "signedInAs": "Signed in as {email}", + "signOutOf": "Sign out of {email}" }, "landing": { "headline": "From speech to text, in moments", diff --git a/web/messages/fa.json b/web/messages/fa.json index dd5b8a1..02839d5 100644 --- a/web/messages/fa.json +++ b/web/messages/fa.json @@ -15,7 +15,11 @@ "new": "رونویسی تازه", "archive": "آرشیو", "switchToEn": "English", - "switchToFa": "فارسی" + "switchToFa": "فارسی", + "signIn": "ورود", + "signOut": "خروج", + "signedInAs": "واردشده با {email}", + "signOutOf": "خروج از حساب {email}" }, "landing": { "headline": "از گفتار به متن، در چند لحظه", diff --git a/web/src/app/[locale]/login/page.tsx b/web/src/app/[locale]/login/page.tsx index 9fa181c..1971d47 100644 --- a/web/src/app/[locale]/login/page.tsx +++ b/web/src/app/[locale]/login/page.tsx @@ -1,9 +1,10 @@ "use client"; -import { useState, type FormEvent } from "react"; +import { useEffect, useState, type FormEvent } from "react"; import { useTranslations } from "next-intl"; import { useRouter } from "@/i18n/navigation"; import { ApiError, login, register, setToken, tokenLogin } from "@/lib/api"; +import { useSession } from "@/lib/session"; type Mode = "login" | "register" | "code"; @@ -13,6 +14,12 @@ export default function LoginPage() { const t = useTranslations("login"); const te = useTranslations("errors"); const router = useRouter(); + const { ready, signedIn } = useSession(); + + // Already signed in: the login form has nothing to offer. + useEffect(() => { + if (ready && signedIn) router.replace("/new"); + }, [ready, signedIn, router]); const [mode, setMode] = useState("login"); const [email, setEmail] = useState(""); @@ -71,8 +78,7 @@ export default function LoginPage() { : mode === "register" ? await register(email.trim(), password) : await tokenLogin(code.trim()); - setToken(result.api_token); - router.push("/new"); + setToken(result.api_token, result.email); } catch (error) { setPending(false); if (error instanceof ApiError) { diff --git a/web/src/app/[locale]/page.tsx b/web/src/app/[locale]/page.tsx index daf34fb..4a4a69e 100644 --- a/web/src/app/[locale]/page.tsx +++ b/web/src/app/[locale]/page.tsx @@ -1,6 +1,7 @@ import { getTranslations, setRequestLocale } from "next-intl/server"; import { ArrowRight, GraduationCap, TextSearch, Voicemail, type LucideIcon } from "lucide-react"; import { Link } from "@/i18n/navigation"; +import { LoginCta } from "@/components/login-cta"; const waveBars = [12, 20, 30, 22, 34, 40, 28, 16, 26, 36, 20, 30, 14, 24, 32, 18, 26, 12, 22, 16]; @@ -69,12 +70,9 @@ export default async function LandingPage({ {t("startCta")}