newsquid/tt_client — pull request #1 by mlwork (2014-12-21 13:51:46+00:00)
Title: Single sign in

When signing in, and a 'code' parameter is given in the url, the current user is retrieved from the API and the user is redirected to the profile page, rather than the user ending up on the front page without being signed up.

This introduces a call to ttUserApi.getCurrentUser() in the 'oath_...' service which also happens in the 'sign_in_controller'. The reason for having the call here as well is to avoid the many redirects; we could also just redirect to '/sign_in', which would do the call, but in practice the browser updates too many times for it to be pleasant.

This reduces sign in from 3 clicks on 'Sign in' to 2. We still have the problem of NEWSQUID not redirecting to the oauth endpoint but rather to the client when signing in. This will require more drastic changes.