{"id":18524366,"url":"https://github.com/omniauth/omniauth-oauth","last_synced_at":"2025-07-27T20:06:56.331Z","repository":{"id":54798313,"uuid":"2439113","full_name":"omniauth/omniauth-oauth","owner":"omniauth","description":"A generic OAuth strategy for OmniAuth.","archived":false,"fork":false,"pushed_at":"2024-08-27T16:23:06.000Z","size":40,"stargazers_count":74,"open_issues_count":1,"forks_count":47,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T02:45:32.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/omniauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2011-09-22T18:28:56.000Z","updated_at":"2025-03-07T15:10:22.000Z","dependencies_parsed_at":"2024-11-06T17:45:40.733Z","dependency_job_id":null,"html_url":"https://github.com/omniauth/omniauth-oauth","commit_stats":{"total_commits":41,"total_committers":12,"mean_commits":"3.4166666666666665","dds":0.6341463414634146,"last_synced_commit":"afa3f8103c7da12f1bb33941f823107a2d686540"},"previous_names":["intridea/omniauth-oauth"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omniauth%2Fomniauth-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omniauth%2Fomniauth-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omniauth%2Fomniauth-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omniauth%2Fomniauth-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omniauth","download_url":"https://codeload.github.com/omniauth/omniauth-oauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332588,"owners_count":20921854,"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-06T17:41:06.409Z","updated_at":"2025-04-19T16:46:05.590Z","avatar_url":"https://github.com/omniauth.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OmniAuth OAuth\n\nThis gem contains a generic OAuth strategy for OmniAuth. It is meant to\nserve as a building block strategy for other strategies and not to be\nused independently (since it has no inherent way to gather uid and user\ninfo).\n\n## Creating an OAuth Strategy\n\nTo create an OmniAuth OAuth strategy using this gem, you can simply\nsubclass it and add a few extra methods like so:\n\n```ruby\nrequire 'json'\nrequire 'omniauth-oauth'\n\nmodule OmniAuth\n  module Strategies\n    class SomeSite \u003c OmniAuth::Strategies::OAuth\n      # Give your strategy a name.\n      option :name, \"some_site\"\n\n      # This is where you pass the options you would pass when\n      # initializing your consumer from the OAuth gem.\n      option :client_options, {:site =\u003e \"https://api.somesite.com\"}\n\n      # These are called after authentication has succeeded. If\n      # possible, you should try to set the UID without making\n      # additional calls (if the user id is returned with the token\n      # or as a URI parameter). This may not be possible with all\n      # providers.\n      uid{ request.params['user_id'] }\n\n      info do\n        {\n          :name =\u003e raw_info['name'],\n          :location =\u003e raw_info['city']\n        }\n      end\n\n      extra do\n        {\n          'raw_info' =\u003e raw_info\n        }\n      end\n\n      def raw_info\n        @raw_info ||= JSON.load(access_token.get('/me.json').body)\n      end\n    end\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomniauth%2Fomniauth-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomniauth%2Fomniauth-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomniauth%2Fomniauth-oauth/lists"}