cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: OAuth2 http authentication, how to have browser show success?

OAuth2 http authentication, how to have browser show success?

Scott_M
Explorer | Level 3
Go to solution

In our OAuth1, after the user clicked 'Allow' in the browser, the user would get a 'success' message.

 

In our OAuth2, the 'Allow' page in the browser just sits there (even though the app has authenticated and gotten the token). Eventually it times out and says:

 

"Hmm, we can't reach this page."

 

It seems to me that somehow that browser should get updated to say 'success'.

 

I've implemented a localhost server on the specified port and it is getting the returned authorization code. Do I need to post something back to let the browser know everything is fat, dumb and happy? If so, what?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
Thanks! That's helpful, and it's what I expected. In this case, the best solution would be to configure your localhost server to respond to that GET request with a simple HTML success page of your liking.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

The OAuth 1 and OAuth 2 flows do work a bit differently. With the OAuth 2 "code" flow, which it sounds like you're using, the user is sent to the specified redirect URI after they authorize your app. That's how the app receives the authorization code. Often, this is just an Internet-hosted web page, so the user sees whatever web page that is.

In your case though, it sounds like you're using a localhost server just to receive the redirect, and there's no page to display. If that's the issue, you can have your localhost server itself respond with a simple success page to display at that point.

Feel free to post a screenshot of the issue to make sure I understand what you're seeing though.

Scott_M
Explorer | Level 3
Go to solution

http://tinypic.com/view.php?pic=vzeywy&s=9

 

That's a link to a screen shot of what I get.

Greg-DB
Dropbox Staff
Go to solution
Thanks! That's helpful, and it's what I expected. In this case, the best solution would be to configure your localhost server to respond to that GET request with a simple HTML success page of your liking.

Scott_M
Explorer | Level 3
Go to solution

OK. It might be nice if there was a way to get the browser to display a success response (as in OAuth1) where the success message had a Dropbox look and feel to it.

 

But I have it doing something semi-ugly now. I'll see if I get someone to put together something nice looking...

Need more support?