Remember Choice and other context settings before redirecting user to an external service
This issue is a proposal to find a better way to keep the user context before redirection on an external service.
For the moment we have a lot of code in all authentications modules to add the Choice param to the redirect URL. For example in LinkedIn:
# Use authChoiceParam in redirect URL
if ( $req->param( $self->conf->{authChoiceParam} ) ) {
$callback_url .= ( $callback_url =~ /\?/ ? '&' : '?' );
$callback_url .= build_urlencoded( $self->conf->{authChoiceParam} =>
$req->param( $self->conf->{authChoiceParam} ) );
}
We have other parameters to keep before redirecting a user:
- Origin URL (if redirection on portal was done by Handler)
- Skin
I think we should have a single step in the code that will store these values in a local session and find a common way to restore them when user is back.
This can be applied at least to these authentication backends:
- CAS
- SAML
- OpenID/OpenID Connect
Using a cookie can be a good solution.