Contribution Date
Technology
Contribution Project
Contribution Details
There are two things here:
- Destination link on successful login
- 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.):
- For a checkout login page, we need to place the social auth link block here.
- 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
- - when user comes on checkout login page it has the url like -
- What about on fail? user should go back to checkout login page, Not the user login page.
- For this we can use
HTTP_REFERER
, and set it in session withlogin_error_destination
key. - the link goes to
user/login/facebook
path we store the HTTP_REFERER which is /checkout/login aslogin_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 Issue Link
Files count
0
Patches count
0