I'm running into an issue with facebook login in once I deploy to Heroku. I disabled sandbox mode by setting my "making the app available to the public". I can't quite tell if this is a facebook settings issue or an issue with my app. I've been searching hard for an answer and haven't been able to find any.
Heroku Logs:
heroku[router]: at=info method=GET path="/auth/facebook/callback"
OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter or a `fbsr_XXX` cookie))
I've tried some other strategies such as switching to gem "omniauth-facebook", "~> 1.4.1" but ran into a CSRF issue there.
I'm using:
* oauth2 (0.9.4)
* omniauth (1.2.2)
* omniauth-facebook (1.4.1)
* omniauth-oauth2 (1.1.2)
My routes are pretty standard
get 'auth/:provider/callback', to: 'sessions#create'
get 'auth/failure', to: redirect('/')
get 'signout', to: 'sessions#destroy', as: 'signout'
And finally my JS
$scope.login = function() {
FB.login(function(response) {
console.log(response);
return window.location = '/auth/facebook/callback';
})
}