We are using the .NET SDK. Just like you we've been using it with an on-premises datafile, but are now needing to move online so as so support STP Phase 2.
We are only just embarking on this process, so haven't yet attempted to implement the OAuth 2.0 authentication so unable to answer your question. However, from reading information about the process, it appears that the implementation forces user interaction as part of the authentication flow. This is not going to work for us as we have console apps that run as a service each night to extract data into a SQL data warehouse.
I am waiting to hear back from support as to whether there is a client credential flow supported that will allow for authentication without user interaction.
I will post here on what I find.