Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter auth still uses OAuth1 #35

Open
jwoertink opened this issue Jan 25, 2022 · 0 comments
Open

Twitter auth still uses OAuth1 #35

jwoertink opened this issue Jan 25, 2022 · 0 comments

Comments

@jwoertink
Copy link
Contributor

The twitter auth is a bit tricky. All of the current supported engines use OAuth2 except Twitter.

@consumer ||= OAuth::Consumer.new("api.twitter.com", key, secret)

The issue is that Twitter itself gives you several different secret keys to choose from:
Screenshot from 2022-01-25 14-23-31

If you use the Access Token and Secret, you'll get a NilAssertionError, but no information that actually tells you that you're plugging OAuth2 keys in to an OAuth1 provider. In this case, you need to use the "Consumer Keys".

I'm not really sure what the actionable item is here, but here's a few options:

  • Upgrade Twitter to OAuth 2
  • Add docs telling you which one of these to use (i.e. the Consumer Keys)
  • Rescue the nil assertion, and raise a better exception that tells you your keys are not valid OAuth1 credentials.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant