{"id":13729657,"url":"https://github.com/unasuke/omniauth-twitter2","last_synced_at":"2025-04-05T05:03:05.354Z","repository":{"id":56886611,"uuid":"447574284","full_name":"unasuke/omniauth-twitter2","owner":"unasuke","description":"OmniAuth strategy for authenticating with Twitter OAuth2","archived":false,"fork":false,"pushed_at":"2025-01-01T07:52:52.000Z","size":35,"stargazers_count":42,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T04:09:33.312Z","etag":null,"topics":["authentication","gem","oauth2","omniauth","ruby","twitter"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unasuke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"unasuke","custom":"https://www.buymeacoffee.com/unasuke"}},"created_at":"2022-01-13T11:29:39.000Z","updated_at":"2025-01-01T07:52:55.000Z","dependencies_parsed_at":"2024-10-27T12:16:08.923Z","dependency_job_id":"2f6bbce5-cd5c-406a-a485-62d4b883f302","html_url":"https://github.com/unasuke/omniauth-twitter2","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"e8f67c5896ae2b223c5e7f84e16da87b4a6cdb00"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fomniauth-twitter2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fomniauth-twitter2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fomniauth-twitter2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fomniauth-twitter2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unasuke","download_url":"https://codeload.github.com/unasuke/omniauth-twitter2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289409,"owners_count":20914464,"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":["authentication","gem","oauth2","omniauth","ruby","twitter"],"created_at":"2024-08-03T02:01:03.499Z","updated_at":"2025-04-05T05:03:05.330Z","avatar_url":"https://github.com/unasuke.png","language":"Ruby","readme":"# OmniAuth::Twitter2\n[![test](https://github.com/unasuke/omniauth-twitter2/actions/workflows/main.yml/badge.svg)](https://github.com/unasuke/omniauth-twitter2/actions/workflows/main.yml)\n[![GitHub license](https://img.shields.io/github/license/unasuke/omniauth-twitter2)](https://github.com/unasuke/omniauth-twitter2/blob/main/LICENSE.txt)\n[![Gem Version](https://badge.fury.io/rb/omniauth-twitter2.svg)](https://rubygems.org/gems/omniauth-twitter2)\n\nThis gem provides a OmniAuth strategy for authenticating with Twitter OAuth2.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'omniauth-twitter2'\n```\n\nAnd then execute:\n\n```\n$ bundle install\n```\n\nOr install it yourself as:\n\n```\n$ gem install omniauth-twitter2\n```\n\n## Usage\n\n### Rails\n\n```ruby\n# config/initializers/omniauth.rb\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :twitter2, ENV[\"TWITTER_CLIENT_ID\"], ENV[\"TWITTER_CLIENT_SECRET\"], callback_path: '/auth/twitter2/callback', scope: \"tweet.read users.read\"\nend\n```\n\n### Auth Hash\n\n```ruby\n  { \"provider\" =\u003e \"twitter2\",\n    \"uid\" =\u003e \"108252390\",\n    \"info\" =\u003e {\n      \"name\" =\u003e \"うなすけ\",\n      \"email\" =\u003e nil,\n      \"nickname\" =\u003e \"yu_suke1994\",\n      \"description\" =\u003e \"帰って寝たい\",\n      \"image\" =\u003e \"https://pbs.twimg.com/profile_images/580019517608218624/KzEZSzUy_normal.jpg\",\n      \"urls\" =\u003e {\n        \"Website\" =\u003e \"https://t.co/NCFLB8wDkx\",\n        \"Twitter\" =\u003e \"https://twitter.com/yu_suke1994\"\n      }\n    },\n    \"credentials\" =\u003e {\n      \"token\" =\u003e \"TOKENTOKENTOKENTOKENTOKENTOKEN\",\n      \"expires_at\" =\u003e 1642016242,\n      \"expires\" =\u003e true\n    },\n    \"extra\" =\u003e {\n      \"raw_info\" =\u003e {\n        \"data\" =\u003e {\n          \"profile_image_url\" =\u003e \"https://pbs.twimg.com/profile_images/580019517608218624/KzEZSzUy_normal.jpg\",\n          \"url\" =\u003e \"https://t.co/NCFLB8wDkx\",\n          \"public_metrics\" =\u003e {\n            \"followers_count\" =\u003e 2188,\n            \"following_count\" =\u003e 1478,\n            \"tweet_count\" =\u003e 162937,\n            \"listed_count\" =\u003e 110\n          },\n          \"verified\" =\u003e false,\n          \"name\" =\u003e \"うなすけ\",\n          \"entities\" =\u003e {\n            \"url\" =\u003e {\n              \"urls\" =\u003e [{\n                \"start\" =\u003e 0,\n                \"end\" =\u003e 23,\n                \"url\" =\u003e \"https://t.co/NCFLB8wDkx\",\n                \"expanded_url\" =\u003e \"https://unasuke.com\", \"display_url\" =\u003e \"unasuke.com\"\n              }]\n            }\n          },\n          \"description\" =\u003e \"帰って寝たい\",\n          \"created_at\" =\u003e \"2010-01-25T10:10:22.000Z\",\n          \"username\" =\u003e \"yu_suke1994\",\n          \"protected\" =\u003e false,\n          \"id\" =\u003e \"108252390\"\n        }\n      }\n    }\n  }\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## References\n\n* Twitter official resources\n  * [twitterdev/Twitter-API-v2-sample-code: Sample code for the Twitter API v2 endpoints](https://github.com/twitterdev/Twitter-API-v2-sample-code)\n  * [OAuth 2.0 Making requests on behalf of users | Docs | Twitter Developer Platform](https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token)\n* [arunagw/omniauth-twitter: OmniAuth strategy for Twitter](https://github.com/arunagw/omniauth-twitter)\n* [omniauth/omniauth-oauth2: An abstract OAuth2 strategy for OmniAuth.](https://github.com/omniauth/omniauth-oauth2)\n* [nov/twitter_oauth2: Twitter OAuth 2.0 Client Library in Ruby](https://github.com/nov/twitter_oauth2)\n\n## Sample App\n* \u003chttps://twitter-login-app.onrender.com/\u003e\n  * \u003chttps://github.com/unasuke/twitter-login-app\u003e\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/unasuke/omniauth-twitter2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/unasuke/omniauth-twitter2/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [Apache License 2.0](https://opensource.org/licenses/Apache-2.0).\n\n## Code of Conduct\n\nEveryone interacting in the OmniAuth::Twitter2 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/unasuke/omniauth-twitter2/blob/main/CODE_OF_CONDUCT.md).\n","funding_links":["https://github.com/sponsors/unasuke","https://www.buymeacoffee.com/unasuke"],"categories":["Libraries"],"sub_categories":["Ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funasuke%2Fomniauth-twitter2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funasuke%2Fomniauth-twitter2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funasuke%2Fomniauth-twitter2/lists"}