Skip to content

Omniauth strategy for product hunt or producthunt strategy for omniauth

License

Notifications You must be signed in to change notification settings

vantran-se/omniauth-producthunt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omniauth::Producthunt

Omniauth strategy for Producthunt. It sets the scope to private+public so that authenticated user's details can be obtained. By default public scope will not grant access to these details.

Installation

Add this line to your application's Gemfile:

  gem 'omniauth-producthunt', git: 'https://github.com/lukaszkorecki/omniauth-producthunt.git'

And then execute:

  $ bundle

Usage

Add this to an initializer or your application configuration:

  Rails.application.config.middleware.use OmniAuth::Builder do
    provider :producthunt, ENV['producthunt_key'], ENV['producthunt_secret']
  end

or with Devise

  config.omniauth :producthunt, ENV['producthunt_key'], ENV['producthunt_secret'], callback_url: 'http://example.com/users/auth/producthunt/callback'

Starting from version 1.4 in omniauth-oauth2 you must provide same callback url you have provided on API dashboard otherwise authentication won't work.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/omniauth-producthunt/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Omniauth strategy for product hunt or producthunt strategy for omniauth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%