Symfony bhLDAPAuthPlugin redirect issue

126 Views Asked by At

i'm having troubles with the bhLDAPAuthPlugin for symfony when the user session expires. It redirects to the signin form as expected but once the user is authenticated, instead of redirect him to the requested page (the one witch first requested the user), it redirects him to the requested page adding exra information to the URL.

Let me show it to you with an example: The user is in this URL and the session expires myapp/editSomething/id/231

And then is redirected by the bhLDAPAuthPlugin to the signin form. Once the user had entered the username & password is redirected here myapp/editSomething/images/loadingAnimation.gif

I dont know what loadingAnimation.gif is (is not in my /images/ directory nor in anywhere else of my app), nor where is this additional information added :S

Could you please help me to find the place where i must change this behaviour?

Thank you! :D

1

There are 1 best solutions below

4
On BEST ANSWER

Every thing is done in the action. The redirect url is build here:

// always redirect to a URL set in app.yml
// or to the referer
// or to the homepage
$signinUrl = sfConfig::get('app_sf_guard_plugin_success_signin_url', $user->getReferer('@homepage'));

Did you define something in your app.yml for app_sf_guard_plugin_success_signin_url ?

all:
  sf_guard_plugin:
    success_signin_url: @my_route?param=value # the plugin uses the referer as default

So it seems that your referer is bad. Try to define an url in the app.yml to see if the behavior is different.