The project is in a healthy, maintained state
NitroID Strategy for OmniAuth.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
= 13.0.6
= 3.11.0
= 1.31.1

Runtime

 Project Readme

omniauth-nitro-id

OmniAuth strategy for NitroID. To use it, you will need an OAuth2 Client ID and Secret. For more information, see the NitroID user guide.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-nitro-id'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-nitro-id

Supported Ruby Versions

omniauth-nitro-id supports 2.7.4 and 3.1.2

Usage

Example configuration

config.omniauth :nitro_id, {
  client_options: {
      identifier: "CLIENT_ID",
      secret: "SECRET",
  }
}

Decoding NitroID's RSA256-encoded logout token

token = params[:logout_token]
# eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5vcGVuaWQuaWQtdG9rZW4iLCJ0eXAiOiJK...

OmniAuth::Strategies::NitroId.decode_logout_token(token)
# [{"aud"=>["196da0d5-adc6-4454-98f2-3cabae04855c"], "events"=>{"http://schemas.openid.net/event/backchannel-logout"=>{}}, "iat"=>1688672696, "iss"=>"https://id.powerhrg.com/" ...

Check out Power's example Rails app for details on how to use this gem with Devise.