<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: UWP Webview and Token Authorization in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506108#M25026</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1423713"&gt;@nashworth&lt;/a&gt;&amp;nbsp;Thanks for sharing that link!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1423902"&gt;@Semaphore&lt;/a&gt;&amp;nbsp;Thanks for the feedback! I'll pass it along to the team to see if we can get that working again. I can't make any promises myself though as web views &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;weren't officially supported for this&lt;/A&gt;, and the app authorization page is part of&amp;nbsp;the&amp;nbsp;Dropbox web site and so subject to&amp;nbsp;&lt;A href="https://help.dropbox.com/installs-integrations/desktop/system-requirements#web" target="_self"&gt;its system requirements&lt;/A&gt;. I'll follow up here once I have an updates on that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given that, whether or not the team is able to make this work in the web view again, I highly&amp;nbsp;recommend updating your app to use the system browser as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;documented&lt;/A&gt;. It looks like &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app" target="_self"&gt;launching the URI as shown here in Microsoft's documentation&lt;/A&gt;, and &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation" target="_self"&gt;handling the result via a custom URL scheme as shown here in their documentation&lt;/A&gt; would be a good solution going forward.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 21:10:48 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-03-18T21:10:48Z</dc:date>
    <item>
      <title>UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505807#M25011</link>
      <description>&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;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:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm" target="_blank" rel="noopener"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More information regarding the issues with Webview and Edge 18 I found here which confirms multiple users are being affected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropboxforum.com/t5/Dropbox-installs-integrations/Upgrade-your-browser-to-use-Dropbox/m-p/505132" target="_blank" rel="noopener"&gt;https://www.dropboxforum.com/t5/Dropbox-installs-integrations/Upgrade-your-browser-to-use-Dropbox/m-p/505132&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 13:48:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505807#M25011</guid>
      <dc:creator>nashworth</dc:creator>
      <dc:date>2021-03-19T13:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505945#M25015</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dropbox.png" style="width: 800px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/21726i995A18313E736FEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="dropbox.png" alt="dropbox.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 13:41:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505945#M25015</guid>
      <dc:creator>Semaphore</dc:creator>
      <dc:date>2021-03-18T13:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505947#M25016</link>
      <description>&lt;P&gt;Exact same problem, same error message about "Upgrade your browser". Was working fine last week or just before Dropbox made the change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 13:58:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505947#M25016</guid>
      <dc:creator>nashworth</dc:creator>
      <dc:date>2021-03-18T13:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505987#M25021</link>
      <description>&lt;P&gt;It sounds like the web view unfortunately doesn't use a recent/supported browser engine even when the latest Edge is installed. Using &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;web views isn't officially supported for the OAuth flow though&lt;/A&gt; anyway, so the flow should be sent through the system browser regardless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;receive the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The API v2 .NET SDK doesn't have a sample like this for UWP,&amp;nbsp;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.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 16:03:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505987#M25021</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-18T16:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505988#M25022</link>
      <description>&lt;P&gt;Thank you, I will look into that option. The existing samples provide a blueprint for how it should work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Documentation on creating a uri scheme for UWP app to handle redirect:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation" target="_blank"&gt;https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 16:08:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/505988#M25022</guid>
      <dc:creator>nashworth</dc:creator>
      <dc:date>2021-03-18T16:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506031#M25023</link>
      <description>Hello Greg, it's not an option. You've broken many uwp apps (end users are frustrated) and waiting a month while you prepare sample and we rewrite our apps, build them, publish and pass certification is not what people are waiting for. Other cloud providers like google and onedrive still work fine and end users are forced to switch to them. Is that a recommended solution to a problem? Obsoleting edge 18 was premature and unjustified choise and needed to be unrolled in expedite way.</description>
      <pubDate>Thu, 18 Mar 2021 18:07:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506031#M25023</guid>
      <dc:creator>Semaphore</dc:creator>
      <dc:date>2021-03-18T18:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506036#M25024</link>
      <description>In the worst case you can offer another button "proceed anyway". I don't believe edge 18 won't be able to display two buttons and several textboxes.</description>
      <pubDate>Thu, 18 Mar 2021 18:22:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506036#M25024</guid>
      <dc:creator>Semaphore</dc:creator>
      <dc:date>2021-03-18T18:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506108#M25026</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1423713"&gt;@nashworth&lt;/a&gt;&amp;nbsp;Thanks for sharing that link!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1423902"&gt;@Semaphore&lt;/a&gt;&amp;nbsp;Thanks for the feedback! I'll pass it along to the team to see if we can get that working again. I can't make any promises myself though as web views &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;weren't officially supported for this&lt;/A&gt;, and the app authorization page is part of&amp;nbsp;the&amp;nbsp;Dropbox web site and so subject to&amp;nbsp;&lt;A href="https://help.dropbox.com/installs-integrations/desktop/system-requirements#web" target="_self"&gt;its system requirements&lt;/A&gt;. I'll follow up here once I have an updates on that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given that, whether or not the team is able to make this work in the web view again, I highly&amp;nbsp;recommend updating your app to use the system browser as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;documented&lt;/A&gt;. It looks like &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app" target="_self"&gt;launching the URI as shown here in Microsoft's documentation&lt;/A&gt;, and &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation" target="_self"&gt;handling the result via a custom URL scheme as shown here in their documentation&lt;/A&gt; would be a good solution going forward.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 21:10:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506108#M25026</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-18T21:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506717#M25038</link>
      <description>&lt;P&gt;Hi Greg!&lt;/P&gt;&lt;P&gt;If you highly recommend updating our app &lt;SPAN&gt;to use the system browser as&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank" rel="noopener noreferrer"&gt;documented&lt;/A&gt;, is it possible to get simple sample how to do this in UWP?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need ANY help. I spent many days for trying to get help from your documentation, wrote two tickets, but couldn't find working docs for UWP.&lt;/P&gt;&lt;P&gt;Since October our customers couldn't use our app for connecting to their data in Dropbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, please, remove samples for universalDemo from&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/dotnet" target="_blank"&gt;https://www.dropbox.com/developers/documentation/dotnet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's completely useless for UWP now.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Mar 2021 19:42:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506717#M25038</guid>
      <dc:creator>Andrey K.1</dc:creator>
      <dc:date>2021-03-21T19:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506972#M25045</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/43015"&gt;@Andrey K.1&lt;/a&gt;&amp;nbsp;Thanks for the feedback! I've sent this to the team to get the examples updated, but I can't offer a timeline for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that using a custom URL scheme with the PKCE flow works though. I don't have an official example to offer, but while I'm not a UWP programmer myself, it looks like the necessary pieces work in my testing. For instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, I define a redirect URI using a custom URI scheme:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;private readonly Uri RedirectUri = new Uri("customappurl://redirect_receiver/");&lt;/LI-CODE&gt;
&lt;P&gt;The "customappurl" is just an example. You should use something unique and specific to your app instead. The "redirect_receiver" can also be whatever you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I register that custom URI scheme in the UWP app as covered in &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation" target="_self"&gt;Microsoft's 'Handle URI activation' documentation&lt;/A&gt;, and the redirect URI for the&amp;nbsp;Dropbox API app on &lt;A href="https://www.dropbox.com/developers/apps" target="_self"&gt;the Dropbox App Console&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I can configure the PKCE flow otherwise &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OAuthPKCE/Program.cs#L184" target="_self"&gt;as shown in the existing example&lt;/A&gt; and get the authorization URL and&amp;nbsp;launch that authorization URL in the system browser as shown in &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app" target="_self"&gt;the Microsoft 'Launch the default app for a URI' documentation&lt;/A&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var OAuthFlow = new PKCEOAuthFlow();
var authorizeUri = OAuthFlow.GetAuthorizeUri(OAuthResponseType.Code, ApiKey, RedirectUri.ToString(), state: state, tokenAccessType: TokenAccessType.Offline, scopeList: scopeList, includeGrantedScopes: includeGrantedScopes);

var success = await Windows.System.Launcher.LaunchUriAsync(authorizeUri);
if (success)
{
    // URI launched
    System.Diagnostics.Debug.WriteLine("Launching authorize URI succeeded.");
}
else
{
    // URI launch failed
    System.Diagnostics.Debug.WriteLine("Launching authorize URI failed.");
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That opens the authorization page in the system browser, and after the user authorizes the app, I can receive the resulting redirected URI as&amp;nbsp;eventArgs.Uri in&amp;nbsp;OnActivated per &lt;A href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation" target="_self"&gt;the Microsoft 'Handle URI activation' documentation&lt;/A&gt;. That should be passed to&amp;nbsp;ProcessCodeFlowAsync &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OAuthPKCE/Program.cs#L199" target="_self"&gt;like&amp;nbsp;redirectUri is in the existing example&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 16:51:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/506972#M25045</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-22T16:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/508452#M25103</link>
      <description>&lt;P&gt;Thanks, Greg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It really helps!&lt;/P&gt;&lt;P&gt;At last, are there any options to close a browser page&amp;nbsp;&lt;A href="https://www.dropbox.com/oauth2/authorize.." target="_blank"&gt;https://www.dropbox.com/oauth2/authorize..&lt;/A&gt;. with Cancel/Allow buttons after authorization?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Mar 2021 15:49:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/508452#M25103</guid>
      <dc:creator>Andrey K.1</dc:creator>
      <dc:date>2021-03-28T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: UWP Webview and Token Authorization</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/508697#M25110</link>
      <description>&lt;P&gt;Thanks for following up. No, unfortunately I don't believe there's a way to close that page. I'll send this along to the team to see if we can improve this in the future, but I can't make any promises.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:09:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p/508697#M25110</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-29T15:09:28Z</dc:date>
    </item>
  </channel>
</rss>

