I installed the gem as directed, and placed this into my config/initializers/omniauth.rb file:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :reddit, '[FILTERED APP ID]', '[FILTERED APP SECRET', {:duration => "permanent", :scope => "identity"}
end
It brings me to the page where I can click "allow" on reddit, and sends the state and code to my callback, but immediately crashes with the OAuth::Error:
invalid_grant: {"error": "invalid_grant"}`
Here's a small trace (pertinent to omniauth):
oauth2 (1.2.0) lib/oauth2/client.rb:140:in `get_token'
oauth2 (1.2.0) lib/oauth2/strategy/auth_code.rb:29:in `get_token'
omniauth-oauth2 (1.4.0) lib/omniauth/strategies/oauth2.rb:89:in `build_access_token'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/omniauth-reddit-4e54423f2d8a/lib/omniauth/strategies/reddit.rb:35:in `build_access_token'
omniauth-oauth2 (1.4.0) lib/omniauth/strategies/oauth2.rb:73:in `callback_phase'
omniauth (1.3.1) lib/omniauth/strategy.rb:227:in `callback_call'
omniauth (1.3.1) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.3.1) lib/omniauth/builder.rb:63:in `call'
I installed the gem as directed, and placed this into my config/initializers/omniauth.rb file:
It brings me to the page where I can click "allow" on reddit, and sends the
stateandcodeto my callback, but immediately crashes with the OAuth::Error:Here's a small trace (pertinent to omniauth):