https://github.com/andrew/omniauth-oauth

A generic OAuth strategy for OmniAuth.

https://github.com/andrew/omniauth-oauth

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 12 committers (8.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A generic OAuth strategy for OmniAuth.

Basic Info
  • Host: GitHub
  • Owner: andrew
  • License: mit
  • Default Branch: master
  • Homepage:
  • Size: 41 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of omniauth/omniauth-oauth
Created almost 2 years ago · Last pushed almost 2 years ago

https://github.com/andrew/omniauth-oauth/blob/master/

# OmniAuth OAuth

This gem contains a generic OAuth strategy for OmniAuth. It is meant to
serve as a building block strategy for other strategies and not to be
used independently (since it has no inherent way to gather uid and user
info).

## Creating an OAuth Strategy

To create an OmniAuth OAuth strategy using this gem, you can simply
subclass it and add a few extra methods like so:

```ruby
require 'json'
require 'omniauth-oauth'

module OmniAuth
  module Strategies
    class SomeSite < OmniAuth::Strategies::OAuth
      # Give your strategy a name.
      option :name, "some_site"

      # This is where you pass the options you would pass when
      # initializing your consumer from the OAuth gem.
      option :client_options, {:site => "https://api.somesite.com"}

      # These are called after authentication has succeeded. If
      # possible, you should try to set the UID without making
      # additional calls (if the user id is returned with the token
      # or as a URI parameter). This may not be possible with all
      # providers.
      uid{ request.params['user_id'] }

      info do
        {
          :name => raw_info['name'],
          :location => raw_info['city']
        }
      end

      extra do
        {
          'raw_info' => raw_info
        }
      end

      def raw_info
        @raw_info ||= JSON.load(access_token.get('/me.json').body)
      end
    end
  end
end
```

Owner

  • Name: Andrew Nesbitt
  • Login: andrew
  • Kind: user
  • Location: Bristol, UK
  • Company: @ecosyste-ms and @octobox

Working on mapping the world of open source software @ecosyste-ms and empowering developers with @octobox

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 41
  • Total Committers: 12
  • Avg Commits per committer: 3.417
  • Development Distribution Score (DDS): 0.634
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Erik Michaels-Ober s****k@g****m 15
Michael Bleigh m****l@i****m 14
Mark Dodwell m****k@m****k 2
Vladimir Kitaev v****v@f****m 2
Adif Sgaid 6****d@u****m 1
Bobby McDonald b****o@g****m 1
Christopher Slade c****e@g****m 1
Daniel Doubrovkine (dB.) @dblockdotorg d****k@d****g 1
Jamie Wilkinson j****e@j****m 1
Javier Diez Flaquer j****f@g****m 1
Jordi Massaguer Pla j****a@s****e 1
Shinichi Maeshima n****t@g****m 1
Committer Domains (Top 20 + Academic)