cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Known issues updated. Learn more
Highlighted
Level 4

Dropbox SDK windows, redirect to localhost after successful authorization issue

Using DropboxOAuth2Helper and samples from Dropbox SDK for Windows, I had successfully implemented authorization (and I get valid access token). Part of this process is redirection to localhost, after Allowing application access with Dropbox, with response and access token in fragment. In this case it shows that application waits for response on port which is registered as redirecturi on Dropbox.

Only issue I got is that I'm left with window and "Unable to connect" message.

Again to mention, I got access token, url_with_fragment parameter, authentication is successful, so that is all a ok.

Problem is just leftover message and window with this ugly message.

User can close this window manually, but we do not find this nice nor professional.

Do you have any suggestion how to get rid of this message (or this window or tab) after successful authorization?

 

Before.png1. Before authorizationAfter.png2. After authorization

1 Accepted best answer

Accepted Solutions
Dropboxer

Re: Dropbox SDK windows, redirect to localhost after successful authorization issue

[Cross-linking for reference: https://stackoverflow.com/questions/53669144/dropbox-sdk-redirect-to-localhost-after-successful-auth... ]

That 127.0.0.1:... page is a being served by the local web server that you control, for the purpose of receiving  the access token. Once you receive the access token from the request with the url_with_fragment parameter, you can respond with an HTTP response containing whatever you'd like to show the user at that point. E.g., you can serve a basic HTML page showing a success message, telling the user they can close the tab/window, etc.. The error message here seems to just be indicating that the local web server isn't currently issuing a valid response.

Reply
Loading...
1 Reply
Dropboxer

Re: Dropbox SDK windows, redirect to localhost after successful authorization issue

[Cross-linking for reference: https://stackoverflow.com/questions/53669144/dropbox-sdk-redirect-to-localhost-after-successful-auth... ]

That 127.0.0.1:... page is a being served by the local web server that you control, for the purpose of receiving  the access token. Once you receive the access token from the request with the url_with_fragment parameter, you can respond with an HTTP response containing whatever you'd like to show the user at that point. E.g., you can serve a basic HTML page showing a success message, telling the user they can close the tab/window, etc.. The error message here seems to just be indicating that the local web server isn't currently issuing a valid response.

Reply
Loading...
Who's talking
Top contributors to this post