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

Runtime

 Project Readme

OmniAuth Edenred

Gem Version

Strategy to authenticate Edenred in OmniAuth.

Installation

OmniAuth Edenred is distributed as a gem, which is how it should be used in your app.

Include the gem in your Gemfile:

gem 'omniauth-edenred', '~> 1.0'

Integrate this strategy to your OmniAuth middleware.

Rails.application.config.middleware.use OmniAuth::Builder do
  provider(
    :edenred,
    ENV['EDENRED_CLIENT_ID'],
    ENV['EDENRED_SECRET_KEY'],
    sandbox: !Rails.env.production?,
    scope: 'openid edg-xp-mealdelivery-api offline_access',
    authorize_params: {
      acr_values: "tenant:XXXXX",
      ui_locales: 'fr-FR'
    }
  )
end

Common problems

If you get an error JWT::ImmatureSignature 'Signature nbf has not been reached', it means your server date is not up to date.

Author

License

OmniAuth Edenred is released under the MIT license. See the LICENSE file for more info.