Telegram WebApp Integration

Secure authentication and native Telegram WebApp features

Loading Telegram WebApp...
Detecting Telegram environment...
Environment Info
In Telegram:No
Theme:light
Auth Status:loading
How to Use

For Development:

  • โ€ข Open this app in a regular browser to see the "Not in Telegram" state
  • โ€ข The app automatically detects the Telegram WebApp environment
  • โ€ข Mock data is used for testing outside of Telegram

For Production:

  • โ€ข Create a Telegram bot using @BotFather
  • โ€ข Set the Web App URL to your deployed application
  • โ€ข Configure TELEGRAM_LOGIN_BOT_TOKEN in environment variables
  • โ€ข Users can access the app through the bot's menu button

Authentication Flow:

  • โ€ข User opens the WebApp from Telegram
  • โ€ข initData is automatically validated on the server
  • โ€ข User account is created/linked in the database
  • โ€ข NextAuth session is established with Hasura claims