Hi,
I'm using the Dropbox Api 4.9.3 for .NET, and there is some weird behavior during/after authentication.
What I do is:
- open a WebBrowserDialog
- get authorizeUri using DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Token, m_ClientId, m_RedirectUrl, m_Oauth2State, forceReauthentication: true);
- navigate to that Uri
- get the OAuth2Response using DropboxOAuth2Helper.ParseTokenFragment(redirectUrl);
- save that OAuth2Response and close the WebBrowserDialog
so far so good, the OAuth2Response is usable and I can create a working DropboxClient whenever I need
When I first access the dropboxClient.Users.GetCurrentAccountAsync-Method, it opens my browser with the empty redirect-url (title something with authentication successful)
I don't get where that's coming from and why.
The workaround I found was to keep the WebBrowserDialog open and do the first call to client.Users.GetCurrentAccountAsync() there, so it opens the empty redirect-url, but within that browserDialog, which I immediately close afterwards.