rails + devise Twitter 認証を行っていたらこちらのエラーが発生

OAuth::Unauthorized

403 Forbidden

self.token_request(http_method, uri.path, token, request_options, arguments)
 when (400..499)
  raise OAuth::Unauthorized, response
 else
  response.error!
end

私の解決方法は、twitterのAPI設定ページでwww を外すことで解決しました!

# ダメ
https://www.domain.com/users/auth/twitter/callback
# いけた
https://domain.com/users/auth/twitter/callback

参考記事

403 Forbidden on /users/auth/twitter #131

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA