For whom: Dashboard administrator with the right Manage users.
What you need: access to @BotFather and the domain on which the panel works.
Step 1: Set up the provider
The setup is performed once for the entire installation.1
Open the authentication section
Go to Settings → Authentication. It is the Telegram login that is configured here – not to be confused with Settings → Telegram, where the panel notification bot lives.
2
Copy the Callback URL
In the card, Telegram login has a Callback URL with the Copy button. This address will need to be specified in BotFather.
3
Create a Login App in BotFather
Open @BotFather, create a sign-in application, specify the panel domain and the copied Callback URL. BotFather will issue Client ID and Client Secret.
4
Fill in the fields in the panel
Insert Client ID and Client Secret, turn on the Switch Enable Sign-in via Telegram and press Save.
Client Secret is stored in a secure secret repository and is never returned via the API. When re-editing, leave the field blank to keep the current secret.
Step 2: Linking Telegram to your account
As long as you don’t have a Telegram attached to your account, you can’t log in through it. There are three ways to link it.Your account.
1
Open accounts.
Go to Settings → Accounts.
2
Tie up Telegram.
In the card Entrance via Telegram press Attach Telegram.
3
Confirm in Telegram
You’ll be redirected to Telegram. Once confirmed, the panel will take you back and show “Telegram tied.”
A new user immediately from Telegram
In the wizard Add the user (see Accounts and login) fill in the field Telegram User ID. Password can not be set - then the user will only log in via Telegram.Support operator from Telegram
In Support → Operators operator can be added by Telegram-nickname or ID. The panel creates a full-fledged user Axottle with a tied Telegram and support role — a separate “accountless” entity is no longer. More: Operators and roles.What does the entrance look like?
- On the entrance screen, click Log in via Telegram.
- Confirm the entrance to Telegram.
- The panel will check Telegram’s response on its side and open the session.
/support-panel).
Telegram’s unbundling
In the card Entrance via Telegram press Untie Telegram.You can’t remove the only way you’re logging in. If you don’t have a password, the panel will fail — you need to set the password first.
Diagnostics
If the input fails, the panel returns to the login screen and shows the reason. The full message is duplicated in the panel logs.
Logs of the panel on attempts to enter:
What’s going on under the hood
- Authorization Code Flow with PKCE is used: the authorization code changes to a token on the server side, it does not get into the browser.
- Telegram’s response is verified by signature (JWKS), publisher, recipient, expiration date and disposable
nonce. - The service values of
stateandPKCE verifierare disposable and live for 10 minutes. - The session is issued as a
HttpOnlycookie – the token is not available from JavaScript.
Verification
The button Sign in via Telegram is visible on the login screen, the attached user logs in without a password, and the unbound Telegram account is refused with an understandable message.
Rollback
- Turn off the switch in Settings → Authentication – the login button will disappear, the bindings will remain.
- You can untie Telegram from a specific user in his card (if he has a password).
