mamantoha / omniauth-vkontakte

Vkontakte OAuth2 Strategy for OmniAuth
MIT License
141 stars 73 forks source link

ERROR -- omniauth: (vkontakte) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected #46

Open erudinsky opened 8 years ago

erudinsky commented 8 years ago

Guys!

I am trying to get user signed in with vkontakte using openapi as written here https://vk.com/dev/Javascript_SDK with omnioauthcallbackcontroller what gives me error ERROR -- omniauth: (vkontakte) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected on callback.

Can you shed some light on what am I doing wrong? Same approach with FB and others work..

erroric commented 8 years ago

You must append :provider_ignores_state => true key to the confiruration config.omniauth :vkontakte

NinjaValerok commented 7 years ago

when i append :provider_ignores_state => true, looks like that: config.omniauth :vkontakte, 'my_app_id', 'my_app_secret', scope: 'email', provider_ignores_state: true I began to get an error - 'Invalid credentials'. By clicking on the link is working