1.4 KiB
1.4 KiB
Telegram UserAuth UI
Reusable Angular-hosted UI for the Telegram login dialog.
The app now contains a single standalone page based on the extracted dialog design. It preserves the same visual states and the same state-switcher behavior from the provided HTML:
readyloadingcheckingexpirederror
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 3 seconds
- QR expiry after 100 checks on the frontend
- direct Telegram login button support
- 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.