I'm using devise (4.8.1) and omniauth-twitter and I have "Login with Twitter" working. A user can sign in (a User is created if it doesn't exist yet), the session is persisted and I can store their access token in the database to do further API requests.
For some new Twitter API endpoints I have to upgrade to OAuth 2: https://developer.twitter.com/en/docs/authentication/oauth-2-0
I'm wondering what's the current way of accomplishing that, I can see there's a [omniauth-oauth2][1] gem but I don't see how this hooks into Twitter and Devise.
I could just implement the callback endpoints from the Twitter's OAuth 2 but I'm unsure how I'd feed that information to Devise then so it takes care of the session persistence.
Any idea where to start?
Thanks!