There are two things here:
Destination link on successful login
Error Destin...

Contribution Date
Technology
Contribution Project
Contribution Details

There are two things here:

  1. Destination link on successful login
  2. Error Destination link on error

Destination link is the next page after login, and error destination is the original page from where the login request is being made.

Sorry! I again considering a scenario of checkout process (And ignoring user login/register as it's working fine and no change needed there.):

  1. For a checkout login page, we need to place the social auth link block here.
  2. Now we use destination query string here, it is going to be the destination after successful login. (Which is already there in 2.x)
    • - when user comes on checkout login page it has the url like - /checkout/login?destination=/checkout/payment
    • - the social auth link on checkout login page for facebook (i.e.) now becomes - user/login/facebook?destination=/checkout/payment
  3. What about on fail? user should go back to checkout login page, Not the user login page.
  4. For this we can use HTTP_REFERER, and set it in session with login_error_destination key.
  5. the link goes to user/login/facebook path we store the HTTP_REFERER which is /checkout/login as login_error_destination.

so, when user authenticated successfully we redirect them to login_destination else on error redirect them to login_error_destination

Issue Status
Needs work
Contribution Author
Files count
0
Patches count
0