You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

nashworth's avatar
nashworth
Helpful | Level 5
4 years ago

UWP Webview and Token Authorization

Since Dropbox has decided to nix support for Edge 18, which has made the UWP Webview control useless for authorization to get a token, is there a workable solution for UWP?

 

I have not found a way for a UWP app to launch the external browser, perform the OAuth2 flow, and then listen for the redirect URL in response to retrieve the token. I have examined this page, but it applies to WPF desktop apps or ASP web apps and the HttpListener does not work in UWP without special permissions or command lines:

 

https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm

 

Is there ANY workable solution for a UWP app to authorize a user to get a token to upload/download files to Dropbox storage from a UWP app that works out of the box?

 

More information regarding the issues with Webview and Edge 18 I found here which confirms multiple users are being affected:

 

https://www.dropboxforum.com/t5/Dropbox-installs-integrations/Upgrade-your-browser-to-use-Dropbox/m-p/505132

  • Semaphore's avatar
    Semaphore
    Helpful | Level 6

    I also experience this problem. The problem is that I cannot update webview until MS will release all the features I need in WinUI 3.0.

    • nashworth's avatar
      nashworth
      Helpful | Level 5

      Exact same problem, same error message about "Upgrade your browser". Was working fine last week or just before Dropbox made the change. 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    It sounds like the web view unfortunately doesn't use a recent/supported browser engine even when the latest Edge is installed. Using web views isn't officially supported for the OAuth flow though anyway, so the flow should be sent through the system browser regardless.

     

    If you can't run a listener to handle the redirect URI in UWP, one solution may be to send the PKCE OAuth flow through the system browser, with a custom URL scheme registered in your app used as the redirect URI to receive the result.

     

    The API v2 .NET SDK doesn't have a sample like this for UWP, but I'll pass this along as a feature request for the team to write and share one. I can't promise if/when that might be done though.