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

Development

Runtime

 Project Readme

OmniAuth privatbank.ua

Using This Strategy

First start by adding this gem to your Gemfile:

gem 'omniauth-privatbank-ua'

Next, tell OmniAuth about this provider. For a Rails app, your config/initializers/omniauth.rb file should look like this:

Rails.application.config.middleware.use OmniAuth::Builder do
  if Rails.env.production?
    provider :'privatbank-ua', ENV['ua_privatbank_client_id'], ENV['ua_privatbank_client_secret'],
      private_key_path: ENV['ua_privatbank_client_private_key_path']
  else
    #for some reason in development we get ssl verification errors
    require 'openssl'
    OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
    provider OmniAuth::Strategies::PrivatbankUaSandbox, ENV['ua_privatbank_client_id'], ENV['ua_privatbank_client_secret'],
      private_key_path: ENV['ua_privatbank_client_private_key_path']
  end
end