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 OAuth2 flow always asks for user authorization confirmation #3

Open
fdocr opened this issue Jan 6, 2023 · 2 comments
Open

Comments

@fdocr
Copy link

fdocr commented Jan 6, 2023

I noticed the OAuth2 flow always asks users to confirm authorization when signing in, even after they've already given authorization to the app before.

From the Twitter docs all I can see that somewhat resembles what I want to do (once the user account gives authorization don't request confirmation next time until it was revoked by the user, like in OAuth 1.0) is offline.access.

I added this scope to the basic "tweet.read users.read", but from what I've tested I now believe that this only works on access tokens. Every time a user is signed out from the web app where I'm implementing this gem (migrate from 1.0 to OAuth 2) or wants to sign in on a different device/browser they will still go through the OAuth flow and Twitter will request authorization confirmation.

Is there a way to get around this? Perhaps I'm overlooking something.

@unasuke
Copy link
Owner

unasuke commented Jan 16, 2023

@fdocr Thank you for the report. I'll check this behavior.

@jkotchoff
Copy link

This will work with the new OAuth2 authentication requirements from Twitter (using the less full featured but much smaller twitter_oauth2 gem):
https://gist.github.com/jkotchoff/e2f5e5fa431f090ab2fb62613287dfbb

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

3 participants