0.0
No commit activity in last 3 years
No release in over 3 years
OmniAuth strategy for Nuwe.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
= 3.2.0

Runtime

~> 1.0
< 2.0, >= 1.1.1
 Project Readme

build status

OmniAuth Nuwe

This gem contains the Nuwe OAuth2 Strategy for OmniAuth.

Installation

Add to your application's Gemfile:

gem 'omniauth-nuwe'

Then bundle install.

Usage

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

Nuwe uses the Doorkeeper gem to use NuAPI as an OAuth2 provider. This is necessary to gain access to the V3 endpoints of this API. Developers can sign up for a developer account at https://developer.nuwe.co.

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 :nuwe, ENV['APPLICATION_ID'], ENV['CLIENT_SECRET']
end

You can now access the OmniAuth Nuwe OAuth2 URL: /auth/nuwe.

Example

  1. Clone this repo and cd into it
  2. bundle install
  3. cd example
  4. Set ENV variables for APPLICATION_ID and CLIENT_SECRET
  5. Set callback URI to http://localhost:9292/auth/nuwe/callback in your developer account at https://developer.nuwe.co.
  6. bundle exec rackup
  7. Open http://localhost:9292 in your browser and follow links