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

Development

~> 1.3
>= 0

Runtime

 Project Readme

OmniAuth Humanapi

This is a OmniAuth strategy for authenticating to HumanAPI. To use it, you'll need to sign up for an OAuth2 Application ID and Secret on the Human API applications page.

Basic Usage

use OmniAuth::Builder do
  provider :humanapi, ENV['HUMANAPI_KEY'], ENV['HUMANAPI_SECRET']
end

Example Sinatra usage

get '/auth/humanapi/callback' do
  auth   = env['omniauth.auth']
  uid    = auth[:uid]
  email  = auth[:info][:email]
  token  = auth[:credentials][:token]
  'ok'
end

Pre-registration

HumanAPI allows you to pre-register users so they won't have to sign up themselves. By pre-registering, you will receive a humanId for every user. This has to be passed as a query parameter to the authentication path:

/auth/humanapi?human_id=52867cbede3155565f000a0d