{"id":15595130,"url":"https://github.com/simonneutert/ruby-telegram-login-web-stub-tutorial","last_synced_at":"2025-07-22T01:06:13.211Z","repository":{"id":82304156,"uuid":"296554766","full_name":"simonneutert/ruby-telegram-login-web-stub-tutorial","owner":"simonneutert","description":"demo ruby project with roda framework providing a working telegram login process ","archived":false,"fork":false,"pushed_at":"2025-06-01T19:59:55.000Z","size":29,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-02T05:53:41.487Z","etag":null,"topics":["ajax","demo","roda","ruby","telegram","telegram-api","telegram-bot-api","telegram-loing","tutorial","webapp"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonneutert.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2020-09-18T08:02:23.000Z","updated_at":"2025-06-01T19:59:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"352ea5a8-d54b-458b-b4e7-a297f2b89c51","html_url":"https://github.com/simonneutert/ruby-telegram-login-web-stub-tutorial","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/simonneutert/ruby-telegram-login-web-stub-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Fruby-telegram-login-web-stub-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Fruby-telegram-login-web-stub-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Fruby-telegram-login-web-stub-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Fruby-telegram-login-web-stub-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonneutert","download_url":"https://codeload.github.com/simonneutert/ruby-telegram-login-web-stub-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Fruby-telegram-login-web-stub-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266405405,"owners_count":23923536,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ajax","demo","roda","ruby","telegram","telegram-api","telegram-bot-api","telegram-loing","tutorial","webapp"],"created_at":"2024-10-03T00:43:11.516Z","updated_at":"2025-07-22T01:06:13.190Z","avatar_url":"https://github.com/simonneutert.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Login Ruby Roda Demo\n\n**please, read the official telegram login article** \\\nat https://core.telegram.org/widgets/login _(at least skim it!)_\n\n## For those who demo run this code 👋\n\nHey there, glad you gave this a spin! As this project tries to give other rubyists a hand to get tgram going, it is quite possible, that things might not be as straightforward, as I think they are. \n\nSo, just in case the code isn't speaking for itself, or docs could be improved. Something's unclear, please, either open an issue or a PR with suggestions we can discuss. In both cases add as much details as possible (without leaking keys/credentials 🐞).\n\n## Requirements\n\nYou definitely need:\n* [ngrok](https://ngrok.com) (if there's a nicer substitute out there, one that would lower the effort for this project, please let me know 🙏)\n\nFor running this project locally you need one of the following two:\n* Ruby \u003e= 3.0\n* Docker\n\nPeople using Docker see their own paragraph below.\n\n## What this does\n\nThis is a simple demo of the telegram login widget. \\\nYou can login using your telegram account. \\\nOnce logged in successfully, your profile is rendered. \\\nThe data is stored in a session cookie (not persisted for a longer time). \\\nA background job is enqueued to greet via your telegram bot after a few seconds.\n\nOptional:\n\nRun `$ ruby bot.rb` to start the bot listening for messages. \\\nIt will echo back the message you sent.\n\n## Run this project\n\nThe project requires two parts. \\\nOne being ngrok as gate to the internet, handing out a domain, telegram will use. \\\nThe other is the code of this repo a.k.a the backend.\n\nAnd of course you need to have your bot on telegram ready.\n\n### ngrok Development Server\n\n#### Telegram Bot Setup\n\n* go, see [@BotFather](https://telegram.me/botfather) on telegram\n* create/choose your desired bot (you should have a bot already)\n* create your bot and set the domain in the settings\n  * the domain you copied from ngrok (https://....ngrok.io)\n* see what .env.example ships with and create a `.env` (copy of .env.example) edit with your credentials\n\n#### Start and keep running an ngrok Development Server\n\nhave ngrok installed and start a server by `$ ngrok http -p 5555` and copy the https url you are given\n\n**Remember** you need to set the domain in the bot settings, each time you restart ngrok!\n\n### Run the backend\n\nRun it local using (A) Ruby or via (B) Docker.\n\n#### A - Ruby\n\n* clone this repo\n* `$ bundle install`\n* open another terminal window and run `bundle exec rackup -p 5555`\n* open your **browser at the given ngrok https://** (‼️) domain\n\nclap your hands and login with telegram!\n\n#### B - Docker\n\n```shell\n# builds the image\ndocker build . -t ruby-telegram-login`\n# run the image with your envs replaced\ndocker run -it --rm -p5555:5555 \\\n  -e TELEGRAMBOTNAME='yourBot' \\\n  -e TELEGRAMBOTSECRETKEY='123:abc-def' \\\n  -e 'a-super-long-128-char-string' \\\n  ruby-telegram-login\n```\n\n* open your browser at the given **ngrok https://** domain\n\nIf you messed up a step above, simply build again, then run again, again, again\n\n### Optional: run the \"echoing\" bot\n\n```shell\n$ ruby bot.rb\n```\nRead/Skim the code to see how it works. [bot.rb](bot.rb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonneutert%2Fruby-telegram-login-web-stub-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonneutert%2Fruby-telegram-login-web-stub-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonneutert%2Fruby-telegram-login-web-stub-tutorial/lists"}