Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

This is the URL that I'm entering (in Safari, cleared website data and cache; my app, uses own Cookie jar; and incognito chrome) https://stackexchange.com/oauth/dialog?client_id=23&scope=read_inbox&redirect_uri=https://stackexchange.com/oauth/login_success

This is the URL of the page that appears (the address changes in the address bar, but it looks like it's the only page visited)


This means I get stuck on the authorising page, (or occasionally is says "You're now being returned to the app")

This only happens if the user is not logged in. If the user is logged in, authorisation flys through like it should.

I think this is a variation of this question: Implicit OAuth flow is not working when the user is not logged in.

Or maybe identical. One of the users of my app had this problem though it seemed to have cleared. I've tried different browsers and clearing cache, but the same problem occurs.

share|improve this question
I can't reproduce this. In all my browsers (including Safari) I end up on /oauth/login_success with an access token and expiration in the hash. Your example includes the same redirect_uri both times, a returnurl is being added in the second case. –  Kevin Montrose Feb 20 '12 at 22:38
As far as I'm aware the API sets the returnurl parameter? Because the final page is this one: stackexchange.com/oauth/…, where it says you are being returned to StackInbox. But I never get to the redirect_uri. –  Jonathan. Feb 20 '12 at 22:48
the behavior of the api is subject to change save for the entry point (/oauth/dialog) and the destination (whatever was passed as redirect_uri). The returnurl being set is an implementation detail relating to allowing anonymous users to login as part of approving an app. The link in your comment is just to a "please approve this app" page, which seems correct to me? –  Kevin Montrose Feb 20 '12 at 22:55
When the login process stops this is the HTML which appears: pastebin.com/R6GG1t3Y, although the javascript stackauth function has the correct URL in it, this is the URL that the page is (I've tried it with Charles proxy to make sure it's not just my app giving the wrong url) stackexchange.com/oauth/…. Now Safari and Chrome have started performing the login correctly (intermittently) –  Jonathan. Feb 20 '12 at 23:10
Hmm, sounds like connectivity issues to stackauth.com. I'll make some changes, odd that it's intermittent though. –  Kevin Montrose Feb 20 '12 at 23:19
same, and other, issue for me. just had not the time at the time to figure out whether i was 'doin it wrong' or what. thanks for raising this. –  Sky Sanders Feb 28 '12 at 16:42
add comment

1 Answer

up vote 0 down vote accepted

A fix for this has been deployed.

For some people it looks like communication with Stack Auth (for global login) was breaking down, causing the final redirect to not happen. I've slapped a timeout on the attempt to communicate with Stack Auth, after which we give up and do the final redirect anyway.

Users so affected won't get global login sessions (nothing we can do about that), but they should still be able to authorize applications.

share|improve this answer
This still appears to be an issue when logging in using StackExchange credentials. The OAuth URL (stackexchange.com/oauth/…) that we use consistently fails to hit the redirect URL on successful login when using StackExchange and sometimes Yahoo! userid's and passwords, and seems to consistently work for GMail and facebook credentials. –  Lee Fastenau Mar 28 '12 at 20:02
@Lee - that should be fixed now, a redirect step was getting dropped under some circumstances on stackexchange.com. –  Kevin Montrose Mar 29 '12 at 0:26
Right now, we're getting "error: invalid_request, error description: OAuth request must be over HTTPS" when trying to log in using gmail, yahoo, and facebook. This is reproducible in our app's webview as well as desktop Safari. This is actually a slightly different issue from what we experienced yesterday. Is anyone else experiencing this? –  Lee Fastenau Mar 29 '12 at 20:23
@Lee try again now, think I found what was breaking those requests. Weird interplay between our SSL accelerator and some (external this time) OpenID/OAuth redirects. –  Kevin Montrose Mar 29 '12 at 21:30
thank you for digging into this. Everything appears to be working great now! –  Lee Fastenau Apr 2 '12 at 17:14
Trying to authorise StackAlert, I get stuck at a popup which advises "This app needs these permissions ..." and tells me that "You need to login to authorize this application". I'm already logged into StackExchange in a different browser tab. Logging out then back in doesn't help. What else should I try? –  Beetroot-Beetroot May 16 '12 at 2:24
This might be completely unrelated but for a completely separate thing (Google Chrome2Phone extension) I encountered an OAuth page not completing redirect and it turned out the time zone was set wrong on my computer, after fixing it the redirect worked as normal: code.google.com/p/chrometophone/issues/detail?id=319#c64 –  Christopher Galpin Apr 22 '13 at 16:33
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .