- Discussions
- 4 645
- Messages
- 12 051
- Solutions
- 81
- J'aime
- 7 608
- Points
- 198
Github link: https://github.com/XF-Telegram/Core
Adds the ability to log in via the Telegram Login Widget. Due to the features of the latter, instead of an instant redirect to Telegram, a page opens with a suggestion to click on the authorization button.
Demonstration :
Télécharger V2.0.3 :
Version 2.0.4 :
Implemented our own \XF::asVisitor() method wrapper. It also changes the active language and style (if required).
This should fix bug when authorization message is sended on default forum language. Now addon respects the selected user language anywhere this is possible.
Télécharger V2.0.4 :
Version 2.0.4.1 Full change list
Changed :
Column type for
Télécharger V2.0.4.1 :
Adds the ability to log in via the Telegram Login Widget. Due to the features of the latter, instead of an instant redirect to Telegram, a page opens with a suggestion to click on the authorization button.
For using Telegram as authentication provider, we need create bot.
If you enabled webhook and uses CloudFlare or any CDN proxy, don't forget add Telegram IP ranges in whitelist. They are presented on the official Telegram site in documentation.
- Open the Telegram Client and find @BotFather user.
- Press button "Start" in window bottom.
- Send the command
/newbot
for starting the process. - Follow the instructions which will come in response in all your actions.
- In reply, after input bot username, you receive your HTTP access token. Do not show it [token] anyone! It important!
- For opportunity use bot as authentication provider, we need say @BotFather our domain where our forum is running. For this, you need use command /setdomain.
Domain should be sended without protocol and URI parts! For example, if your forum is hosted in https://example.com/forum, you need send only example.com! - If you want, you can change user avatar
(/setuserpic)
or change user viewable name(/setname)
. Note you can't change bot username(starts always with @ and ends on bot)
. If you realized the selected username you don't like, it's time recreate bot! - Open the ACP, in Connected accounts find Telegram item and open settings. Copy HTTP access token from BotFather and Save.
- (optional) In Telegram options (Setup → Options → Telegram) enable the webhook update method for receiving all updates from Telegram.
If you enabled webhook and uses CloudFlare or any CDN proxy, don't forget add Telegram IP ranges in whitelist. They are presented on the official Telegram site in documentation.
Demonstration :
Télécharger V2.0.3 :
Vous devez répondre avant de pouvoir voir le contenu des données cachées.
Implemented our own \XF::asVisitor() method wrapper. It also changes the active language and style (if required).
This should fix bug when authorization message is sended on default forum language. Now addon respects the selected user language anywhere this is possible.
Télécharger V2.0.4 :
Vous devez répondre avant de pouvoir voir le contenu des données cachées.
Changed :
Column type for
id
in users table is changed to BigInt
for supporting Bot API v5.4. This change should fix next error when users try log in :
Code:
ErrorException: Fatal Error: Uncaught XF\PrintableException: Please enter a number that is no more than 4294967295.
in /src/XF/Mvc/Entity/Entity.php:1216
Stack trace:
#0 /addons/SModders/TelegramCore/ConnectedAccount/Provider/Telegram.php(105): XF\Mvc\Entity\Entity->save()
#1 /connected_account.php(59): SModders\TelegramCore\ConnectedAccount\Provider\Telegram->requestProviderToken(Object(XF\ConnectedAccount\Storage\StorageState), Object(XF\Http\Request), NULL, false)
#2 {main} thrown src/XF/Mvc/Entity/Entity.php:1216
Télécharger V2.0.4.1 :
Vous devez répondre avant de pouvoir voir le contenu des données cachées.