Recently, the redirect behaviour of login on SEDE has changed (for the worse). Steps to reproduce:

  • When logged off, go to a query page
  • Click the "login" link
  • Login

Previously, you would be returned to the query page in a logged-in state (ready to run the query without captcha).

Currently, you are redirected to the SEDE front page (http://data.stackexchange.com/#) (so you then have to re-navigate back to where you were). The returnurl parameter passed in the first few steps is lost somewhere along the way.

Could the previous "returning" redirect be reinstated?

  • 2
    @Nick this is something that used to work, and not working anymore. How come it's not a bug? Commented May 26, 2015 at 19:43
  • @ShadowWizard maybe nick upgraded it from bug to FR cos it's now in the dev pipeline - probably a tag based workflow thing.
    – Bohemian
    Commented May 26, 2015 at 21:33
  • 2
    Nope, SEDE is open source - Stack Exchange developers don't directly change its code at all, just pull change requests and deploy. Commented May 26, 2015 at 22:31
  • haha, are you afraid of Nick? (we can rollback IMO, worst case he'll change again and we'll give up, but I wish he would at least explain) - anyway I still think it's a bug, so without any word from the one who changed it, rolling back the change. Commented May 27, 2015 at 10:41
  • 1
    @shadow I thought I must have tagged it as FR originally, so I corrected that, but then I noticed Nick's edit and thought there must be a good reason and give him some time to tell us why he changed it. I too think it's a bug - the behaviour feels wrong, even if it isn't a regression, which it is.
    – Bohemian
    Commented May 27, 2015 at 13:22
  • 1
    What's annoying is that it still passes the return URL parameter even though it doesn't use it. Commented Jun 6, 2015 at 21:40
  • 2
    It seems both Tim and myself have a patch for this ready but we are blocked by Nick ...
    – rene
    Commented Feb 17, 2016 at 8:01
  • 2
    @rene still isn't implemented... Commented Jun 8, 2019 at 10:00

2 Answers 2


I've created the Pull Request that fixes this annoyance in the Login.cshtml.

What basically was missing was the returnUrl query parameter on the action of the Login Form:

<form class="openid-form" action="/user/[email protected]["returnurl"]" method="POST">

I've tested only with one OpenID provider, the one from Stack Exchange, but I expect the other providers to work the same.

Allow for 6 to 8 weeks to review, merge and deploy by SE staff.

  • 1
    wow... scarely more than 3 years to fix. btw, I'm surprised that @Request.Params["returnurl"]" works - I would have expected @Request.Params['returnurl']" to be the way to code it. Anyway, thanks!
    – Bohemian
    Commented Sep 12, 2020 at 22:20

Userscript logo

This userscript:

  1. Detects when you visit a SEDE page (targe page) but aren't logged in.
  2. Automatically logs you in. (Currently only supports Stack Exchange's authorization/OpenID.)
  3. Once SEDE is logged in, the script then redirects back to the target page from step 1.

Here's an install-from-GitHub link. (Requires the Tampermonkey or the Violentmonkey browser extension.)

For more information, see the script's home page on Stack Apps.

You must log in to answer this question.

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