• Resolved futureyoon

    (@futureyoon)


    Hi

    Is it possible to set up to redirect to the previous page after logged in using the social login?

    Please advise.

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @futureyoon

    You don’t need to do anything extra for that, as that is the default behavior of Nextend Social Login that is redirects you back to the same page where you pressed the social button.

    So e.g. if you display the social button on a URL like this:

    then if you press the button there, after the login with social login you will be redirected back to https://example.com/my-post page

    However if you mean a redirection more like this:

    1. You are at https://example.com/post1
    2. from there, you redirect the user to https://example.com/custom-login-page where you display the social button
    3. you press the social button at https://example.com/custom-login-page and after the login you want to be redirected to https://example.com/post1

    If this is the case, then I am sorry, but we don’t have an out of the box solution for that.

    If you want to redirect the user to an URL from before, then you need to pass that particular URL in a specific GET parameter at the time when you redirect the user to the page where you display the social button. We respect the “redirect_to” GET parameter, that WordPress also users for the redirects, so e.g. if from:

    you redirected the user to a link like this

    where the redirect_to GET parameter contains the URL encoded url of the page where you want to be redirected, then we would respect that, and after the login with social login, we could redirect the user to the URL that the redirect_to GET parameter contains. So basically you need to build the “custom-login-page” link dynamically via JavaScript using the URL of the current page.
    Please note that, this requires developer knowledge, as we can not provide support for custom coding!

    Best regards,
    Laszlo.

Viewing 1 replies (of 1 total)
  • The topic ‘redirect to previous page’ is closed to new replies.