Telegram login and notifications by Nodeloc (rewritten original extension of Flagrow)

MIT license Latest Stable Version Total Downloads

This extension adds a "Log in with Telegram" button that uses the new Telegram Login widget and add an option to receive notifications via Telegram as well.

Login Page

Notification Config

Notificatios demo

Installation

composer require nodeloc/telegram

Updating

composer update nodeloc/telegram
php flarum migrate
php flarum cache:clear

Configuration

Follow Telegram instructions to create a bot for the login widget.

Then copy the Bot Username and Bot Token to the extension settings. The username and token must belong to the same bot.

If you check Enable Notifications, the login widget will ask for permission for the bot to message the user and an additional Telegram column will appear in the user's notification settings.

Support our work

We prefer to keep our work available to everyone.

Security

If you discover a security vulnerability within Telegram login and notifications, please send an email to security@spitsyn.net. All security vulnerabilities will be promptly addressed.

Please include as many details as possible. You can use php flarum info to get the PHP, Flarum and extension versions installed.

Links

I filled in the token and login of my bot. I tried to write the login in the format @login_bot and login_bot - still the same error.
In addition, when you click on login or registration on the main page, an error also appears.

    Nodeloc
    Flarum
    1.8.5PHP
    8.1.2-1ubuntu2.14MySQL
    10.6.16-MariaDB-0ubuntu0.22.04.1

    Settings

    I attached the domain in the bot via /setdomain.
    ssl works on the site

    On the Login page, instead of the telegram widget, “Bot domain invalid” is displayed.

    On the settings page, when you click on the attach button, this is the message.

      deeankin https://core.telegram.org/widgets/login

      You need to set domain for your site.

      Linking your domain to the bot

      Once you have chosen a bot, send the /setdomain command to @Botfather to link your website's domain to the bot. Then configure your widget below and embed the code on your website.

      Nodeloc Thanks for the help. I noticed that you updated the extension, I updated it and everything worked for me right away.
      Now there is a small problem: immediately after logging in via Telegram, you are sent to a white page without redirecting to the main page, and you have to manually go back to the site.

      At the same time, if the previous registration was not completed, the new user will not be able to register, the same white page will appear.

        @Nodeloc I have everything setup correctly that I am aware of and when I click the link for Telegram it loads the admin page for the settings for this extension and when I click back on the tab I was on it says this Error: Data is NOT from TelegramProvide and I have installed and enabled the extension you linked above and it still doesn’t help.

          Nodeloc
          Flarum core: 1.8.5
          PHP version: 8.2.15
          MySQL version: 10.11.6-MariaDB-1:10.11.6+maria~ubu2204
          Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, exif, msgpack, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, swoole, Zend OPcache
          +----------------------------------------+---------+--------+
          | Flarum Extensions | | |
          +----------------------------------------+---------+--------+
          | ID | Version | Commit |
          +----------------------------------------+---------+--------+
          | flarum-flags | v1.8.0 | |
          | flarum-tags | v1.8.0 | |
          | flarum-approval | v1.8.1 | |
          | flarum-mentions | v1.8.3 | |
          | flarum-subscriptions | v1.8.0 | |
          | flarum-bbcode | v1.8.0 | |
          | flarum-suspend | v1.8.1 | |
          | flarum-sticky | v1.8.0 | |
          | flarum-nicknames | v1.8.0 | |
          | flarum-lock | v1.8.0 | |
          | afrux-forum-widgets-core | v0.1.7 | |
          | fof-pages | 1.0.8 | |
          | datlechin-birthdays | v2.1.1 | |
          | fof-reactions | 1.3.5 | |
          | fof-follow-tags | 1.2.2 | |
          | fof-oauth | 1.6.6 | |
          | flarum-markdown | v1.8.0 | |
          | sycho-advanced-extension-categories | v0.1.3 | |
          | v17development-seo | v1.8.0 | |
          | sycho-profile-cover | v1.3.5 | |
          | nearata-cakeday | v2.2.0 | |
          | mickmelon-coloured-usernames | 0.1.1 | |
          | kilowhat-rich-embeds | 1.3.1 | |
          | kilowhat-audit-free | 1.7.0 | |
          | katosdev-signature | 1.6 | |
          | katosdev-automore | 1.0 | |
          | justoverclock-welcomebox | 2.0.2 | |
          | justoverclock-staff-members-widget | 0.1.3 | |
          | justoverclock-related-discussions | 1.3.4 | |
          | justoverclock-last-users-posts | 0.3.0 | |
          | justoverclock-custom-html-widget | 0.1.4 | |
          | justoverclock-contactme | 0.2.3 | |
          | justoverclock-auto-post-badge-pro | 0.2.1 | |
          | ianm-online-guests | 1.0.0 | |
          | ianm-log-viewer | 0.1.1 | |
          | ianm-html-head | 1.2.3 | |
          | ianm-boring-avatars | 1.0.0 | |
          | glowingblue-redis-setup | 1.2.1 | |
          | fof-user-directory | 1.3.3 | |
          | fof-upload | 1.5.4 | |
          | fof-split | 1.1.1 | |
          | fof-sitemap | 2.2.1 | |
          | fof-share-social | 1.1.3 | |
          | fof-secure-https | 1.1.3 | |
          | fof-profile-image-crop | 1.1.6 | |
          | fof-pretty-mail | 1.1.2 | |
          | fof-polls | 2.1.2 | |
          | fof-nightmode | 1.5.3 | |
          | fof-moderator-notes | 1.2.2 | |
          | fof-merge-discussions | 1.4.1 | |
          | fof-masquerade | 2.1.4 | |
          | fof-linguist | 1.1.2 | |
          | fof-geoip | 1.4.1 | |
          | fof-drafts | 1.2.10 | |
          | fof-cookie-consent | 1.1.2 | |
          | fof-anti-spam | 1.1.2 | |
          | flarumite-simple-discussion-views | 1.2.2 | |
          | flarum-statistics | v1.8.0 | |
          | flarum-likes | v1.8.0 | |
          | flarum-lang-english | v1.8.0 | |
          | flarum-extension-manager | v1.0.1 | |
          | flarum-emoji | v1.8.0 | |
          | dem13n-discussion-cards | 0.3.8 | |
          | davwheat-custom-sidenav-links | 1.0.1 | |
          | datlechin-simple-tour-guide | v0.0.1 | |
          | datlechin-posted-on | v0.2.1 | |
          | datlechin-discussion-overview | v0.0.1 | |
          | datlechin-birthdays-widget | v0.1.0 | |
          | datitisev-post-galleries | 1.1.1 | |
          | club-1-cross-references | v1.1.1 | |
          | clarkwinkelmann-who-read | 1.4.1 | |
          | clarkwinkelmann-status | 1.0.0 | |
          | clarkwinkelmann-scout | 0.3.5 | |
          | clarkwinkelmann-prominent-post-numbers | 1.0.0 | |
          | clarkwinkelmann-mailing | 1.1.0 | |
          | clarkwinkelmann-emojionearea | 1.0.0 | |
          | clarkwinkelmann-discussion-bookmarks | 2.0.1 | |
          | clarkwinkelmann-composer-page | 1.1.1 | |
          | clarkwinkelmann-circle-groups | 1.0.1 | |
          | clarkwinkelmann-auth-popup-failsafe | 0.1.1 | |
          | blomstra-turnstile | 0.1.4 | |
          | blomstra-realtime | 0.2.18 | |
          | blomstra-oauth-apple | 0.1.3 | |
          | blomstra-fontawesome | 0.1.5 | |
          | blomstra-cache-assets | 0.5 | |
          | askvortsov-rich-text | v2.1.7 | |
          | askvortsov-pwa | v3.3.3 | |
          | askvortsov-moderator-warnings | v0.6.3 | |
          | afrux-top-posters-widget | v0.1.4 | |
          | afrux-online-users-widget | v0.1.6 | |
          | afrux-forum-stats-widget | v0.1.1 | |
          | afrux-asirem | v0.1.8 | |
          +----------------------------------------+---------+--------+
          Base URL: https://www.alhsfb.com
          Installation path: /home/forge/www.alhsfb.com/public
          Queue driver: redis
          Session driver: redis (Code override. Configured to file)
          Scheduler status: Active
          Mail driver: smtp
          Debug mode: off

            Nodeloc I have I just don’t want to enable it until the issue is resolved. I’ll enable it real quick. The url to my site is in the info above.

              I think it's not the latest version. Plz upgrade and try it again.

                Nodeloc as far as I know of. It’s linked to my domain and if I change anything in the settings it doesn’t show the button correctly.

                  Nodeloc I just revoked the old token and created a new one and it finally logged me in so maybe it’s working finally.

                  ernestdefoe Okay. The button creates by your bot name but not bot token. So, I doubt that if your config is correct.