I'm successfully using Spring Social to connect to Facebook and Twitter. Currently, if a user clicks on "Connect to Facebook" or "Connect to Twitter", she's taken to the FB or Twitter auth page, authorized and redirected back to my application.

Here I take things into my hands and redirect the user to her profile by extending ConnectController and overriding the connectedView method

e.g.

Code:
@Override
protected String connectedView(String providerId){
  //Get current user details
  user = userService.getCurrentUser();

  //Redirect to her profile
  return "redirect:/profile/+user.getDisplayName();
}
This works fine. But now the problem is, I want to remember the source page from which she pressed the "Connect to Facebook" button (as I've the button on 3 different pages), so that once she's connected she's automatically redirected to her source page.

Please guide me. I'm stuck.