Skip to content

Commit

Permalink
redirect to correct page after social login
Browse files Browse the repository at this point in the history
  • Loading branch information
schnie committed Mar 25, 2014
1 parent 9b10992 commit 8aecc9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/views/social/social.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ Template.entrySocial.events
serviceName = $(event.target).attr('id').split('-')[1]
callback = (err) ->
if (!err)
Router.go AccountsEntry.settings.dashboardRoute
if Session.get('fromWhere')
Router.go Session.get('fromWhere')
Session.set('fromWhere', undefined)
else
Router.go AccountsEntry.settings.dashboardRoute
else if (err instanceof Accounts.LoginCancelledError)
# do nothing
else if (err instanceof ServiceConfiguration.ConfigError)
Expand Down

0 comments on commit 8aecc9c

Please sign in to comment.