Answer the question
In order to leave comments, you need to log in
Authorization via Vkontakte has failed Ruby on Rails, new Api rules?
Good time of the day
, authorization via Vkontakte on the site has recently flown down (in fact, it has flown through Facebook even earlier),
as I understand the reason for the new requirements of the Vkontakte API, where it is necessary to indicate the version of the script in the request link
, if I’m not mistaken, I found it in the code where the request is generated
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
# if Rails.env.staging?
vk_scope = 'email,wall,friends'
if Rails.env.production?
if Rails.root.to_s.include?("site.net")
#site.net
config.omniauth :facebook, '449881xxxxxx', 'bd4ba0e8500c87dxxxxxx', :scope => 'email,publish_stream,read_friendlists', :display => 'popup', image_size: 'large'
config.omniauth :vkontakte, 'xxxx859', 'BKPEGnQxxxxxxxxx', :display => 'popup', :scope => vk_scope
else
elsif Rails.env.development?
config.omniauth :facebook, '1205092xxxxx', '621c95d040cxxxxxx', :scope => 'email,publish_stream,read_friendlists', :display => 'popup', image_size: 'large'
config.omniauth :vkontakte, '4422xxxxx', 'DDGRh9lbZxxxxxx', :display => 'popup', :scope => vk_scope
else
https://oauth.vk.com/authorize?response_type=code&client_id=xxxx859&redirect_uri=https%3A%2F%2Fsite.ru%2Fusers%2Fauth%2Fvkontakte%2Fcallback&state=d88900afc49d321c088978d7e8335337660d3473416f96d0&scope=email%2Cwall%2Cfriends%2Cv&display=popup
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question