Support » Plugin: WP SAML Auth » redirect_to possible?

  • Resolved stupidchief


    I’m trying to get this working for a client.

    Subscribers (default role) on this site do not have access to the WP dashboard.
    is it possible to redirct users after login to a specify frontend page on WordPress in the same way that you can using the ‘redirect_to’ param.

    Currently all logins seem to be redirected back to /wp-admin/

    The client is insisting on having a .htaccess in /wp-admin/ which restricts access to the directory to certain IPs only. many users will have IPs not included

    Do I have to remove this restriction? access to /wp-admin/ is , I presume, neccessary.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber


    Hi @stupidchief,

    You can use the login_redirect filter to apply some conditional behavior on where the user goes after they successfully log in. Here’s a code snippet similar to your use case:

    Hope this helps!

    Thread Starter stupidchief



    Is it possible to have people brought back to the page they logged in from?

    Our users have to login to access various protected areas on the the website and we would like it if they were brought back to the page they came from rather than just brought back to the home page or account page.

    Like you can do using redirect_to normally in wordpress.

    Plugin Author Daniel Bachhuber


    Yes. If you include the redirect_to parameter on the original redirect to wp-login.php, then it will be respected at the end of the authentication flow.

    Thread Starter stupidchief


    Thats Great. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.