waltzio/waltz — pull request #82 by jessepollak (2013-11-21 23:42:17+00:00)
Title: Namespaces logging in variable and starts redirect work

This PR does two things:

1. It namespaces the "transitioning" flag to each domain. This solves the bug where you log in on one site and then jump quickly to another and, because the transitioning flag is set, it prompts you to reenter your credentials. With this transitioning flag namespaced, you have to be on the same domain to get that dropdown.

2. It starts the redirect after login. At the moment, we do this on the *client side*, so the page loads and then it redirects. This is because that's easier and it allows us to check whether the user successfully logged in before redirecting them.

PROBLEMS:

1. 2-factor authentication throws a real stick in this thing. It prompts the 're-enter your credentials' modal because after logging in, the user doesn't appear logged in (they aren't).