Search code examples
ruby-on-railsdeviseruby-on-rails-5omniauthomniauth-twitter

Omniauth-twitter with Rails 5 stopped working! OAuth::Unauthorized 403 Forbidden


Everything was working fine and Omniauth has stopped working suddenly. I didn't make any code changes.

I checked Twitter Apps Settings: I have callback url to my main production url, and Callback URL Locked to No. All keys are correct.

Any idea? 🤔


OAuth::Unauthorized

403 Forbidden

enter image description here


Solution

  • I have been able to solve it (also for development) adding this urls:

    For production:

    • https://mydomain/users/auth/twitter/callback
    • http://mydomain/users/auth/twitter/callback

    For development:

    • http://localhost:3000/users/auth/twitter/callback