I am using simplesamlphp_auth on a D6 multisite setup with each subsite as a 'subfolder' (site.com/subsite1, site.com/subsite2). User and profile tables are shared across all, but these sites are country or region specific. I would like for a user to login (or register) and be redirected back to the page from where they logged in, instead of their user account page.
The current code being used to make this happen is:
print l("Login", "https://site.com/subsite1/saml_login?", array('query' => 'destination=' . $_GET['q']));
and is located in a php block.
Perhaps there could be a checkbox that allows the admin to select "direct user to account" or "return user to login location."
Thanks for the consideration.
Comments
Comment #1
geekwisdom CreditAttribution: geekwisdom commentedI have corrected this in the 6.x-2.x branch. See: http://drupalcode.org/project/simplesamlphp_auth.git/commit/26052d7fbd22...
This fix allows you to provide the ReturnTo parameter to /saml_login if you want to send a user to a specific place after logging in. It also considers the HTTP_REFERER for returning users to the page they where on when they clicked on the link to /saml_login.
Comment #2
doublejosh CreditAttribution: doublejosh commentedI added this feature in the dynamic login link.
#1568172: Configurable dynamic destination login/logout menu links
The patch including the links should also include this...
Comment #4
doublejosh CreditAttribution: doublejosh commentedI not been able to successfully get the the simpleSAMLphp library to execute the ReturnTo. It get dropped in the handoff.
RE:
$_simplesamlphp_auth_as->requireAuth($my_params);
Believe that our OpenAM IdP is destroying the details during authentication.
Anyone dealt with this?
Comment #5
doublejosh CreditAttribution: doublejosh commentedHave this solved. Creating patch.
Comment #6
colanMay as well roll that fix into the patch for the other issue.