d21056bf961a9d19c556407fe89af3ea9fff78a4
Telegram UserAuth UI
Reusable Angular-hosted UI for Telegram login.
The app now boots directly into the live userauth flow instead of a demo dialog. On load it:
- checks
GET /userauth/session - creates a QR session with
POST /userauth/qr/create - polls
GET /userauth/qr/poll?token=...every 5 seconds - falls back to session re-check polling if QR creation or polling fails
Run
npm start
The dev server runs on port 4300.
Build
npm run build
Backend contract
This UI is intended to work against a reusable Telegram auth backend with these endpoints:
GET /userauth/sessionPOST /userauth/qr/createGET /userauth/qr/poll?token=...POST /userauth/qr/confirmGET /userauth/telegram/callbackPOST /userauth/logoutPOST /usersession/{sessionId}
Expected authenticated session payload:
{
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"telegramUserId": 123456789,
"username": "ivan_petrov",
"displayName": "Ivan Petrov",
"active": true,
"expiresAt": "2026-05-21T14:30:00Z"
}
Runtime expectations preserved by the UI:
- QR polling every 5 seconds
- QR expiry after 100 checks on the frontend
- direct Telegram open button using the same deep link returned by QR creation
- fallback session re-check if QR creation fails
Cookie requirements expected by consumers:
- name:
userauth_session - path:
/ HttpOnly: trueSecure: trueSameSite: NoneMaxAge: 86400
Credentialed CORS is required on the backend.
Description
Languages
TypeScript
97.7%
HTML
1.7%
SCSS
0.6%