Skip to content

Crushpath/omniauth-crushpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniAuth Crushpath

This gem contains the Crushpath strategy for OmniAuth 1.0.

Installing

Add to your Gemfile:

gem 'omniauth'
gem 'omniauth-crushpath'

Then bundle install.

Usage

OmniAuth::Strategies::Crushpath is simply a Rack middleware. Read the OmniAuth 1.0 docs for detailed instructions: https://github.com/intridea/omniauth.

Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :crushpath, ENV['CRUSHPATH_KEY'], ENV['CRUSHPATH_SECRET']
end

In Sinatra

use OmniAuth::Builder do
  provider :crushpath, ENV['CRUSHPATH_KEY'], ENV['CRUSHPATH_SECRET']
end

The default site it will connect to is https://deals.crushpath.com but you can change it via the :site option

auth['info']

  • id - The user id
  • full_name - The person's display name
  • email - The person's email
  • image - A url to the full size image for the person
  • description - The person's title
  • company - The organization tied to the person's main job
  • nickname - The vanity_path for the default tenant user
  • urls - Hash with urls
    • :tenant - The tenant subdomain for the default tenant user
    • :crushpath - The user's selected website

auth['extra']

The same data as obtained for https://deals.crushpath.com/users/~.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages