Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced login with redirect back to the targeted page #62

Open
jrottenberg opened this issue Apr 13, 2018 · 4 comments
Open

Forced login with redirect back to the targeted page #62

jrottenberg opened this issue Apr 13, 2018 · 4 comments

Comments

@jrottenberg
Copy link

Hello !

I have been using your plugin successfully for a while it's great but there is a minor issue that I can't address, the site requires login so if you are not connected you will get to the service provider page :

At that point, my user gives up or click on the link from slack or email again. They mostly click again but it's not the best experience. I couldn't find any setting that keep (in a cookie?) the referrer and redirect, or I wonder if it's an issue on my implementation with the service provider.

Maybe there is a companion plugin that takes care of that part, either way, guidance welcome.

thanks a lot !

@pitbulk
Copy link
Contributor

pitbulk commented Apr 13, 2018

When user is redirected to the IdP, a RelayS Tate parameter should be sent with the URL the user wanted to visit.

@jrottenberg
Copy link
Author

jrottenberg commented Apr 18, 2018

Indeed I do see the relayState being populated in the 302 from https://myblog.example.com/2018/04/12/look-at-this-funny-cat-picture

but surprisingly it is set to &RelayState=%2F2018%2F04%2F12%2F/look-at-this-funny-cat-picture%2F
omitting the full host (https://myblog.example.com)

@GitFrankie
Copy link

I know this is an old question, but my redirects are failing because of the same issue - the main site domain is being dropped from the RelayState parameter. I find this happens when I use a link direct to wp-login.php. If I use wp-login.php/saml_sso? the link does not get dropped from RelayState. However, I need to use /wp-login.php?redirect_to= structure due to limitations with my IDP. How can I get the domain to appear, or initiate the SAML process via a different link? Thank you!

@becchett
Copy link

becchett commented Feb 5, 2021

Hi all,
Does anyone fix it ?
I've got the same problem, from my template php page:

if (  !is_user_logged_in() ) {
                                        auth_redirect();
                                }

if the user is not autheticated after SAML login is always sent back to Home Page.
Thanks a lot.
Enrico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants