A Plugin for logging into Jellyfin using the Telegram Login Widget as "SSO" provider.
Allows for simple Group creation/editing/deleting in order to manage Admins/Users/Library-access.
Inspired by jellyfin-plugin-ldapauth and jellyfin-plugin-sso.
Created from jellyfin-plugin-template.
- User clicks the
Sign in with Telegram
Disclaimer Link on the Jellyfin Login Page - User lands on the page
/sso/Telegram
- Plugin shows a Page with embedded Telegram Login Widget.
- When the button is clicked, Plugin validates User credentials using bot token.
- On Success -> Authenticate & redirect User to Jellyfin Dashboard
- On Failure -> Show Error Message (e.g. Invalid Data, not Whitelisted)
-
SSO Login page (at
/sso/Telegram
)- styled similar to the regular login page
- responsive / mobile capable
- shows a "Back to Normal Login" button
- shows the Telegram Login Widget
- checks the Telegram Auth data against the backend
- if data is invalid -> show error message
- if data is valid -> takes the Jellyfin Auth Response and authenticates the user
- loading animation
- supports custom CSS
-
Config page (reachable via Jellyfin Plugin Page)
- requires setting the Telegram Bot Token
- allows setting a List of Administrator Telegram Usernames (get full Access)
- allows forcing an external Protocol Scheme (for reverse proxies like Traefik)
- allows Creating/Editing/Deleting a "virtual" management Group
- Grants access to all OR specific Libraries for non-Administrators.
- Note: A user needs to be Admin OR part of at least ONE Group to Log-in.
- A Telegram Username is mandatory for all users who wish to use this Login method.
- A valid, public SSL certificate is needed for the Login Widget to work (e.g. LetsEncrypt).
- A Telegram Bot (token) is required to cryptograhpically validate the User Login credentials.
You can choose between 3 options below.
- Add the repository: https://raw.githubusercontent.com/hexxone/TeleJelly/dist/manifest.json
- install
TeleJelly
from the Plugin catalogue - restart jellyfin
- Download the 'latest' Release
- Unzip files into
config/plugins/TeleJelly
folder (create it if non-existing) - restart jellyfin
Don't trust the downloads?
git clone https://github.com/hexxone/TeleJelly.git
or download as zip.- install .NET6 SDK / .NET8 (see Tools section below)
- run
publish.ps1
- put
./publish/
files intoconfig/plugins/TeleJelly
folder - restart jellyfin
- Make a new Bot & get the Token via @Botfather
- Make sure to use the
/setdomain
command to link your jellyfin domain (needs valid SSL cert). - Go to the Plugin configuration page and fill in the Bot-Token.
- Add yourself into the "Administrators" list for full access, or create an Administrator Group.
- Now you should be able to log in via Telegram by visiting
jelly.fin/sso/Telegram
. - You may also include this link in the Login "Branding" via Markdown or HTML.
E.g.: [Telegram-Login](https://jelly.fin/sso/telegram)
or screenshots below.
-
This Login-method is intended for Desktop/Browser usage. It has not been tested to be working with official Jellyfin Apps. If you encounter problems, try signing in on a "real" browser instead and use the
Quick Connect
feature when possible. Besides that, there is very little you or I can do. -
The
Sign in with Telegram
button will sometimes get hidden by Browser Plugins like "I don't like Cookies" or "UBlock Origin". Try disabling these on your Jellyfin domain and inform your users. -
If a User's profile picture fails to download even though the url is given (err 404), he has probably set it to private. In this case, the plugin will fall back to its default icon.
-
If a User were to change/sell his Username, a random person would possibly be able to use this Service. However, having Names over ID's is much more convenient for Management.
-
If your server is publicly reachable, make sure to take care of rate limiting with your reverse proxy, otherwise adversaries might be able to lag the system.
Note: Video & Screenshots are taken with my custom css theme applied. The Logo is AI-generated.
tj_demo.mp4
- git
- Visual Studio or Rider IDE
- .NET6 for Jellyfin <= 10.8
- .NET8 for Jellyfin >= 10.9
- JellyFin Server for debugging on Windows. Keep the default path.
- Telegram.Bot library for validating bot token & determining bot username
- ILRepack for packing all dependency dlls into one single plugin dll
- MinVer for automated Release-versioning via git tags
- Run
git clone https://github.com/hexxone/TeleJelly.git
- Open
TeleJelly.sln
file with VS or Rider, restore Nuget packages - Build
TeleJelly
Plugin in Release mode - First run
HttpsReverseProxy
AND thenjellyfin
(server) at the same time. - The plugin gets copied to the server and the browser opens automatically.
When implementing a new feature, please name your commit messages in a meaningful way and refer to git best practices.
The plugin uses "MinVer" and git-tags for semantic versioning.
Most of the Versions (meta.json and manifest.json) get incremented automatically on release build,
but there are some places which have to be done manually - for example in the config.html
.
When targeting an updated version of Jellyfin, remember to set the correct TargetAbi
version in JellyfinPluginHelper
!
Feel free to open a new Pull-Requests for useful additions and fixes.
Licensing is a complex topic. This repository features a GPLv3 license template that can be used to provide a good default license for your plugin. You may alter this if you like, but if you do a permissive license must be chosen.
Due to how plugins in Jellyfin work, when your plugin is compiled into a binary, it will link against the various Jellyfin binary NuGet packages. These packages are licensed under the GPLv3. Thus, due to the nature and restrictions of the GPL, the binary plugin you get will also be licensed under the GPLv3.
If you accept the default GPLv3 license from this template, all will be good. If you however choose a different license, please keep this fact in mind, as it might not always be obvious that a, e.g. MIT-licensed plugin would become GPLv3 when compiled.
Please note that this also means making "proprietary", source-unavailable, or otherwise "hidden" plugins for public consumption is not permitted. To build a Jellyfin plugin for distribution to others, it must be under the GPLv3 or a permissive open-source license that can be linked against the GPLv3.