Discourse Telegram Login

:information_source: Summary Discourse Telegram Login is a simple plugin that enables authentication via Telegram Login Widget
:hammer_and_wrench: Repository Link GitHub - fokx/discourse-telegram-login
:open_book: Install Guide How to install plugins in Discourse

Features

Enable user to login via Telegram.

Configuration

  1. Setup a bot in Telegram following From BotFather to 'Hello World' .
  2. Enable this plugin and fill in telegram_login_bot_name and telegram_login_bot_token.
  3. You may need to add https://telegram.org/js/telegram-widget.js and 'unsafe-inline' to content security policy script src.

Note

  • When successfully authenticated using Telegram, this plugin creates a user with a dummy email: <telegram-id>@telegram.invalid. This may lead to the user losing email notification functionality. pr-welcome to use telegram message as an alternative to email.

  • After clicking ‘Login with Telegram’, a new window will open, containing the Telegram Login Widget.
    Then this plugin will try to open the actual Telegram authentication window, which can be blocked by browser.
    Anyway, the user can click the button in the widget to do it manually. pr-welcome to reduce the second click.
    Screenshot_20240518_100715

TODO

  • Use bot message as an alternative to email
  • Avoid an extra button click by redirecting and capture the returning tgAuthResult

Acknowledgements

This plugin won’t be here without the work by GitHub - mjsir911/discourse-telegram-auth and GitHub - yurijmi/omniauth-telegram: An OmniAuth strategy for Telegram , both of which have long been unmaintained. Thanks @mjsir911!

8 Likes