Fix programmer error in login flow

This commit is contained in:
Andrew Miner
2015-05-11 12:08:59 -07:00
parent 8c54231d52
commit 64274810d7
2 changed files with 5 additions and 3 deletions
@@ -73,12 +73,12 @@ module.exports = class LoginPageController extends PageController
if (not @user?) and (@params?.state is @loginSecurityToken)
@client.completeGitHubLogin code:@params.code
.then (response)->
.then (response)=>
attributes = response.json.data.user
if attributes?
router.user = new User attributes
router.resumeAfterLogin()
.catch (error)->
.catch (error)=>
logger.error "Failed to get access token: #{error}"
@_accessTokenLookupFailed = true
@refresh()