I am having an issue with Omniauth.
Here is what I want to do(at least what I understood devise_token_auth
documentation):
- Log in/signing up from client side using Facebook Login
- After a succesful log in, my facebook app has to run the callback url(provided by onminauth: www.abcdefg.com/auth/facebook/callback)
- The callback creates a user account in my database
The problem I am encountering is that, after a successful login, my Facebook app doesn't run the callback.
Here is a screenshot of my fb app config:
On my Ruby-On-Rails side:
On my gemfile:
gem 'devise_token_auth'
gem 'omniauth-facebook'
in config/initizializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV['FACEBOOK_ID'], ENV['FACEBOOK_SECRET'],
:scope => 'email,user_birthday'
end
Here is my callback route(from rake routes):
/auth/:provider/callback
-- I've replaced :provider by facebook
If you think it is not the right way to implement a facebook login, please feel free to correct me.