Answer the question
In order to leave comments, you need to log in
How to log in through classmates?
gemfile
gem 'rails', '4.2.5'
gem 'devise', '3.5.1'
gem 'omniauth-odnoklassniki'
...
config.omniauth :odnoklassniki,
Rails.application.secrets.odnoklassniki_app_id,
Rails.application.secrets.odnoklassniki_app_secret
...
odnoklassniki_app_id: '1xxxxxxxxx8' пробовал еще CxxxxxxxxA
odnoklassniki_app_secret: BxxxxxxxxxxxxxxxxxB
use OmniAuth::Builder do
provider :odnoklassniki, ENV['APP_ID'], ENV['APP_SECRET_KEY'], :public_key => ENV['APP_PUBLIC_KEY'],
:scope => 'VALUABLE_ACCESS'
end
Answer the question
In order to leave comments, you need to log in
/config/initializers/odnoklassniki.rb:
# Fix Odnoklassniki OAuth gem via
# https://github.com/incubus/omniauth-odnoklassniki/issues/10
OmniAuth::Strategies::Odnoklassniki.class_eval do
def callback_url
options.redirect_url || (full_host + script_name + callback_path)
end
end
config.omniauth :odnoklassniki,
Rails.application.secrets.odnoklassniki_app_id,
Rails.application.secrets.odnoklassniki_app_secret,
:public_key => Rails.application.secrets.odnoklassniki_app_public
odnoklassniki_app_id: '1xxxxxxx8'
odnoklassniki_app_public: CxxxxxxxxxxxxxA
odnoklassniki_app_secret: BxxxxxxxxxxxxxxxxxxxxB
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question