feat: Telegram QR-login via gramjs (per-player MTProto session)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #375 de @bitcoinbrisbane — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- api, authentication, frontend
Línea de trabajo
Start in the player settings flow and review the gramjs integration, including its StoreSession IndexedDB persistence and the QR login sequence. Verify the POST /bindings call to the broker and test the stated outcomes: QR login, reload persistence, tg_user_id binding, and idempotent re-linking.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
FE counterpart for block52/poker-vm#1492. Tracking on this side; the broker-side issue poker-vm#2124 remains open for the cross-repo coordination thread.
Blocks: poker-vm#2125 (Phase 2b seat invite/kick — needs real `tg_user_id`s coming in from gramjs sessions, no manual stopgap by design).
Scope
- Add gramjs (lazy-loaded — bundle is hefty).
- New ``Link Telegram'' flow in player settings:
- Call `auth.exportLoginToken` → get token
- Render `tg://login?token=` as a QR code
- User scans on phone Telegram, confirms
- Poll / receive `auth.loginToken*` updates, end up with an authorized MTProto session
- Persist session in IndexedDB via gramjs `StoreSession`, keyed by the player's wallet address
- Handle 2FA password step (gramjs native)
- After successful login, FE calls `POST /bindings { wallet_address, tg_user_id }` on the broker so seat plumbing can resolve the user later.
Out of scope
- Chat panel UI (sending/receiving messages in the table view) — separate issue, later
- Unlink / multi-device polish — Phase 4 of poker-vm#1492
Definition of done
- `Link Telegram` button in player settings opens a QR.
- Scanning the QR with phone Telegram completes login.
- Session persists across page reloads (no re-prompt).
- `tg_user_id` is POSTed to the broker and a binding row is created.
- Re-linking from a different device works (idempotent on `wallet_address`).
Risks
- `api_id` / `api_hash` in the bundle. These are user-application creds; they end up shipped. Telegram is OK with this (it's how telegram.org/k works) but the keys belong to us and rate-limit us. Register a dedicated FE app at https://my.telegram.org (separate from the broker's app).
- Bundle size. gramjs is ~hundreds of KB. Must be lazy-loaded on settings-panel open, not on app boot.
- 2FA UX. Standard pain — needs a clean re-prompt flow on lost-device.
Refs: poker-vm#1492, poker-vm#2124.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 5
- Merge medio
- 22 h 35 min
- PR fusionados (30 d)
- 91
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de block52/ui
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthAbiertoenhancement tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Hero hole cards render face down after ~1h on a table (auth signature never renewed)Posiblemente ocupada @bitcoinbrisbane la tomó hoy. Abiertobug UI Week 2
block52/ui#953 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Time bank clock is hidden under the NFT avatar: move it left of the seat numberPosiblemente ocupada @Dzeezbtc la tomó hoy. Abiertogame-flow UI ux Week 2
Los mantenedores suelen responder en 1 día
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillPosiblemente ocupada @Dzeezbtc la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
chore(ui): move existing inline null/empty and typeof checks to the guardsPosiblemente ocupada @bitcoinbrisbane la tomó hace 2 días. Abiertorefactor tech debt UI
Los mantenedores suelen responder en 1 día
Todos los issues de block52/ui
Issues similares
-
needs-area
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Azure/typespec-azure#5936 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
vercel-labs/scriptc#2910 ·
Los mantenedores suelen responder en 1 día
-
automation missing-model model-sync provider:fireworks-ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/models.dev#12458 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día