{"id":19615069,"url":"https://github.com/sinsoku/oauth_adapter","last_synced_at":"2026-06-17T07:32:32.459Z","repository":{"id":56886035,"uuid":"49428425","full_name":"sinsoku/oauth_adapter","owner":"sinsoku","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-17T03:43:42.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T01:20:41.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinsoku.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2016-01-11T13:33:55.000Z","updated_at":"2016-01-11T13:34:09.000Z","dependencies_parsed_at":"2022-08-21T00:50:12.517Z","dependency_job_id":null,"html_url":"https://github.com/sinsoku/oauth_adapter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinsoku%2Foauth_adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinsoku%2Foauth_adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinsoku%2Foauth_adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinsoku%2Foauth_adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinsoku","download_url":"https://codeload.github.com/sinsoku/oauth_adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240906964,"owners_count":19876684,"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":[],"created_at":"2024-11-11T10:55:19.362Z","updated_at":"2026-06-17T07:32:32.430Z","avatar_url":"https://github.com/sinsoku.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OAuthAdapter\n\n[![Gem Version](https://badge.fury.io/rb/oauth_adapter.svg)](https://badge.fury.io/rb/oauth_adapter)\n[![Build Status](https://travis-ci.org/sinsoku/oauth_adapter.svg?branch=master)](https://travis-ci.org/sinsoku/oauth_adapter)\n[![codecov](https://codecov.io/gh/sinsoku/oauth_adapter/branch/master/graph/badge.svg)](https://codecov.io/gh/sinsoku/oauth_adapter)\n\nIt provides a simple method to use the OAuth libraries.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'oauth_adapter'\n```\n\nAnd then execute:\n\n    $ bundle\n\n## Configuration\n\n\n```ruby\nOAuthAdapter.configure do\n  provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET'], 'https://api.twitter.com'\n  provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], 'https://api.github.com'\nend\n```\n\n### OmniAuth Support\n\nIf you use with [intridea/omniauth](https://github.com/intridea/omniauth), you may omit the configuration by requiring 'oauth_adapter/omniauth'. This is an example at `config/initializers/omniauth.rb`:\n\n\n```ruby\nrequire 'oauth_adapter/omniauth'\n\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :developer unless Rails.env.production?\n  provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET']\n  provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET']\nend\n```\n\n## Usage\n\nYou will get either appropriate object of OAuth or OAuth2.\n\n```ruby\nOAuthAdapter.get_access_token(provider: :github, token: '\u003caccess_token\u003e')\n#=\u003e #\u003cOAuth2::AccessToken:0x007f9d763e5b50...\nOAuthAdapter.get_access_token(provider: :twitter, token: '\u003caccess_token\u003e', secret: '\u003ctoken_secret\u003e')\n#=\u003e #\u003cOAuth::AccessToken:0x007f9d763d5430...\n```\n\nIf you want to know how to use the `AccessToken` object, you should read to the documentation for each libraries.\n\n- [oauth-xx/oauth](https://github.com/oauth-xx/oauth-ruby)\n- [intridea/oauth2](https://github.com/intridea/oauth2).\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sinsoku/oauth_adapter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinsoku%2Foauth_adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinsoku%2Foauth_adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinsoku%2Foauth_adapter/lists"}