I am trying to create a web API that allows API clients (native mobile applications) to log in using a third-party cloud storage provider. I use the following generic thread from Microsoft:

Here is what I am trying to achieve:

I use the standard ASP.NET Web API Visual Studio template with external authentication, as well as the OWin.Security.Providers Nuget package for Dropbox login features and existing built-in login features for Google (Drive) and Microsoft (OneDrive).
The problem I am facing is that the built-in functionality seems to perform authentication and authorization as part of a single thread. For example, if I set the following in Startup.Auth.cs:
DropboxAuthenticationOptions dropboxAuthOptions = new DropboxAuthenticationOptions { AppKey = _dropboxAppKey, AppSecret = _dropboxAppSecret }; app.UseDropboxAuthentication(dropboxAuthOptions);
... and navigate to this URL from my web browser:
http://<api_base_url>/api/Account/ExternalLogin?provider=Dropbox&response_type=token&client_id=self&redirect_uri=<api_base_url>
I have successfully redirected to Dropbox to login:
https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=<id>&redirect_uri=<redirect_uri>
... and then, after granting access, it is redirected back to:
http://<api_base_url>/Help#access_token=<access_token>&token_type=bearer&expires_in=1209600
... since you can see that the token is part of this, so it can be retrieved. The problem is that the client must be one of those who moves to Dropbox and returns the authorization code back to the web API, and the web API sends the authorization code back to a third party in order to receive the token, which the client will then return ... as shown in the diagram above. I need the ExternalLogin action in the AccountController to somehow get the Dropbox URL and return it to the client (this will be just a json response), but I don't see a way to get it (it just returns a ChallengeResult, and the actual Dropbox code is buried somewhere ) In addition, I think I need a way to separately request a token from a third party based on the authorization code.
This post seems a bit like what I'm trying to do:
Web API 2 front end registration from multiple API clients with OWIN identifier
... but the solution seems to require the client to be an MVC application, which is not necessary for me. I want it to be as simple as possible on the client side, follow the flow from my diagram above, but also do not reinvent the wheel (use as much as possible what already exists in the OWIN / OAuth2 implementation). Ideally, I do not want the client to reference any of the OWIN / OAuth libraries, since all I really need is access to the external url provided by the API (Dropbox in my example), the user enters their credentials and give permission, and send the received authorization code back to the api.
Conceptually this doesnโt sound so complicated, but I donโt know how to implement it and still use as much of the existing OAuth code as possible. Please, help!