{"id":25707581,"url":"https://github.com/DRSchlaubi/telegram-oauth","last_synced_at":"2025-02-25T08:07:09.092Z","repository":{"id":216594408,"uuid":"741740962","full_name":"DRSchlaubi/telegram-oauth","owner":"DRSchlaubi","description":"Telegram login oauth server","archived":false,"fork":false,"pushed_at":"2024-11-18T23:11:02.000Z","size":144,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T21:35:16.791Z","etag":null,"topics":["login-with-telegram","oauth","oauth2","oidc","openid-connect","telegram"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DRSchlaubi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T02:29:50.000Z","updated_at":"2025-02-10T16:37:56.000Z","dependencies_parsed_at":"2024-11-19T00:19:52.160Z","dependency_job_id":"0845a79d-6d71-4f54-b176-9a3637f1a79a","html_url":"https://github.com/DRSchlaubi/telegram-oauth","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.11111111111111116","last_synced_commit":"4c86fed8a83ea13c8a7b4f1a600bdb19cf868fc7"},"previous_names":["drschlaubi/telegram-oauth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRSchlaubi%2Ftelegram-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRSchlaubi%2Ftelegram-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRSchlaubi%2Ftelegram-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRSchlaubi%2Ftelegram-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DRSchlaubi","download_url":"https://codeload.github.com/DRSchlaubi/telegram-oauth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240627960,"owners_count":19831599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["login-with-telegram","oauth","oauth2","oidc","openid-connect","telegram"],"created_at":"2025-02-25T08:06:34.453Z","updated_at":"2025-02-25T08:07:09.023Z","avatar_url":"https://github.com/DRSchlaubi.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# telegram-oauth\n\nTelegram OAuth server for [Telegram Login for Websites](https://core.telegram.org/widgets/login)\n\nThis small tool allows you to deploy use Telegrams non-oauth compliant login API with OAuth 2.0 and OIDC compliant\ntools like [authentik](https://goauthentik.io/)\n\n# Limitations\n\nThese will likely remain, as this is mostly a project for my own use, feel free to copy the code and make your own\nif you need more features\n\n- Only a single OAuth client is supported\n- Only the `grant_type: authorization_code` and `response_type: code` are supported\n- Only the OIDC authorize, token and profile endpoints are supported\n\n# Setup\n\nThe application is distributed under the\n[ghcr.io/drschlaubi/telegram-oauth](https://github.com/DRSchlaubi/telegram-oauth/pkgs/container/telegram-oauth/165793339?tag=main)\ndocker image and can be setup the following way\n\n1. Set up a Telegram bot\n    1. Message [@BotFather](https://t.me/BotFather) on Telegram\n    2. Type `/newbot` and enter a bot Display name and username\n    3. use the `/setdomain` command to set the Domain used for this application\n2. Setup the application\n    1. [Install Docker](https://docs.docker.com/engine/install/)\n    2. Download the [docker-compose file](docker-compose.yml)\n    3. Create a `.env` file like this and run `docker compose up -d`\n      \n```\nTELEGRAM_TOKEN=\u003ctelegram token\u003e\nTELEGRAM_BOT=\u003cbot name\u003e\nURL=\u003curl from step 1.3\u003e\nJWT_SECRET=\u003ccan be generated using pwgen\u003e\nOAUTH_CLIENT_ID=authentik\nOAUTH_CLIENT_SECRET=\u003ccan be generated using pwgen\u003e\nOAUTH_REDIRECT_URIS=\u003credirect uri\u003e\n```\n\n# OAuth endpoints\n\nThese are directly compatible with Authentik, just put the URLs in.\n\nAuthorize: `\u003cURL\u003e/oauth/authorize`\nToken: `\u003cURL\u003e/oauth/token`\nProfile: `\u003cURL\u003e/oauth/profile`\n\n## Profile example \n```json5\n{\n  \"sub\": \"telegram user id\",\n  \"name\": \"telegram user name\",\n  \"given_name\": \"telegram first name\",\n  \"family_name\": \"telegram last name\",\n  \"picture\": \"\u003curl to t.me\u003e\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDRSchlaubi%2Ftelegram-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDRSchlaubi%2Ftelegram-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDRSchlaubi%2Ftelegram-oauth/lists"}