We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

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. 

About Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 years ago
323 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!