I don't know about that Ruby/Gem, but your app registration is not correct. **You need to configure your app for explicit OAuth2, per [this other answer][1], *except* enter `localhost` instead of `example.com`.** Then, in your ruby code: config.omniauth: stackexchange, 'CLIENT_ID', 'CLIENT SECRET', callback_url: 'http://localhost:3000/' (Assuming the rest of that `devise.rb` code was correct. But see [the *OmniAuth StackExchange* doc/GitHub][2] about that.) [1]: https://stackapps.com/a/7852/7653 [2]: https://github.com/nashby/omniauth-stackexchange